Commit 6ba53b81 authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab

[media] coda: remove duplicate error messages for buffer allocations

coda_alloc_aux_buf already prints an error, no need to print duplicate
error messages all over the place.
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 650b939e
...@@ -402,11 +402,9 @@ static int coda_alloc_context_buffers(struct coda_ctx *ctx, ...@@ -402,11 +402,9 @@ static int coda_alloc_context_buffers(struct coda_ctx *ctx,
if (!ctx->parabuf.vaddr) { if (!ctx->parabuf.vaddr) {
ret = coda_alloc_context_buf(ctx, &ctx->parabuf, ret = coda_alloc_context_buf(ctx, &ctx->parabuf,
CODA_PARA_BUF_SIZE, "parabuf"); CODA_PARA_BUF_SIZE, "parabuf");
if (ret < 0) { if (ret < 0)
v4l2_err(&dev->v4l2_dev, "failed to allocate parabuf");
return ret; return ret;
} }
}
if (dev->devtype->product == CODA_DX6) if (dev->devtype->product == CODA_DX6)
return 0; return 0;
...@@ -417,23 +415,16 @@ static int coda_alloc_context_buffers(struct coda_ctx *ctx, ...@@ -417,23 +415,16 @@ static int coda_alloc_context_buffers(struct coda_ctx *ctx,
DIV_ROUND_UP(q_data->height, 16)) * 3200 / 8 + 512; DIV_ROUND_UP(q_data->height, 16)) * 3200 / 8 + 512;
ret = coda_alloc_context_buf(ctx, &ctx->slicebuf, size, ret = coda_alloc_context_buf(ctx, &ctx->slicebuf, size,
"slicebuf"); "slicebuf");
if (ret < 0) { if (ret < 0)
v4l2_err(&dev->v4l2_dev,
"failed to allocate %d byte slice buffer",
ctx->slicebuf.size);
goto err; goto err;
} }
}
if (!ctx->psbuf.vaddr && dev->devtype->product == CODA_7541) { if (!ctx->psbuf.vaddr && dev->devtype->product == CODA_7541) {
ret = coda_alloc_context_buf(ctx, &ctx->psbuf, ret = coda_alloc_context_buf(ctx, &ctx->psbuf,
CODA7_PS_BUF_SIZE, "psbuf"); CODA7_PS_BUF_SIZE, "psbuf");
if (ret < 0) { if (ret < 0)
v4l2_err(&dev->v4l2_dev,
"failed to allocate psmem buffer");
goto err; goto err;
} }
}
if (!ctx->workbuf.vaddr) { if (!ctx->workbuf.vaddr) {
size = dev->devtype->workbuf_size; size = dev->devtype->workbuf_size;
...@@ -442,13 +433,9 @@ static int coda_alloc_context_buffers(struct coda_ctx *ctx, ...@@ -442,13 +433,9 @@ static int coda_alloc_context_buffers(struct coda_ctx *ctx,
size += CODA9_PS_SAVE_SIZE; size += CODA9_PS_SAVE_SIZE;
ret = coda_alloc_context_buf(ctx, &ctx->workbuf, size, ret = coda_alloc_context_buf(ctx, &ctx->workbuf, size,
"workbuf"); "workbuf");
if (ret < 0) { if (ret < 0)
v4l2_err(&dev->v4l2_dev,
"failed to allocate %d byte context buffer",
ctx->workbuf.size);
goto err; goto err;
} }
}
return 0; return 0;
......
...@@ -1932,10 +1932,8 @@ static void coda_fw_callback(const struct firmware *fw, void *context) ...@@ -1932,10 +1932,8 @@ static void coda_fw_callback(const struct firmware *fw, void *context)
/* allocate auxiliary per-device code buffer for the BIT processor */ /* allocate auxiliary per-device code buffer for the BIT processor */
ret = coda_alloc_aux_buf(dev, &dev->codebuf, fw->size, "codebuf", ret = coda_alloc_aux_buf(dev, &dev->codebuf, fw->size, "codebuf",
dev->debugfs_root); dev->debugfs_root);
if (ret < 0) { if (ret < 0)
dev_err(&pdev->dev, "failed to allocate code buffer\n");
goto put_pm; goto put_pm;
}
/* Copy the whole firmware image to the code buffer */ /* Copy the whole firmware image to the code buffer */
memcpy(dev->codebuf.vaddr, fw->data, fw->size); memcpy(dev->codebuf.vaddr, fw->data, fw->size);
...@@ -2173,21 +2171,17 @@ static int coda_probe(struct platform_device *pdev) ...@@ -2173,21 +2171,17 @@ static int coda_probe(struct platform_device *pdev)
ret = coda_alloc_aux_buf(dev, &dev->workbuf, ret = coda_alloc_aux_buf(dev, &dev->workbuf,
dev->devtype->workbuf_size, "workbuf", dev->devtype->workbuf_size, "workbuf",
dev->debugfs_root); dev->debugfs_root);
if (ret < 0) { if (ret < 0)
dev_err(&pdev->dev, "failed to allocate work buffer\n");
goto err_v4l2_register; goto err_v4l2_register;
} }
}
if (dev->devtype->tempbuf_size) { if (dev->devtype->tempbuf_size) {
ret = coda_alloc_aux_buf(dev, &dev->tempbuf, ret = coda_alloc_aux_buf(dev, &dev->tempbuf,
dev->devtype->tempbuf_size, "tempbuf", dev->devtype->tempbuf_size, "tempbuf",
dev->debugfs_root); dev->debugfs_root);
if (ret < 0) { if (ret < 0)
dev_err(&pdev->dev, "failed to allocate temp buffer\n");
goto err_v4l2_register; goto err_v4l2_register;
} }
}
dev->iram.size = dev->devtype->iram_size; dev->iram.size = dev->devtype->iram_size;
dev->iram.vaddr = gen_pool_dma_alloc(dev->iram_pool, dev->iram.size, dev->iram.vaddr = gen_pool_dma_alloc(dev->iram_pool, dev->iram.size,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment