diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2015-03-24 13:30:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-10 09:09:03 -0400 |
commit | 6ba53b81b6f8ad0fde3d7834ad7714abc12aacaa (patch) | |
tree | 599933f22480f6776a6cac5ed52c0864ae862fb1 | |
parent | 650b939ecd3f0a1a9dc800155f7efadeb1794868 (diff) |
[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: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/platform/coda/coda-bit.c | 21 | ||||
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 12 |
2 files changed, 7 insertions, 26 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index 0073f5a5b86c..23041587c898 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c | |||
@@ -402,10 +402,8 @@ static int coda_alloc_context_buffers(struct coda_ctx *ctx, | |||
402 | if (!ctx->parabuf.vaddr) { | 402 | if (!ctx->parabuf.vaddr) { |
403 | ret = coda_alloc_context_buf(ctx, &ctx->parabuf, | 403 | ret = coda_alloc_context_buf(ctx, &ctx->parabuf, |
404 | CODA_PARA_BUF_SIZE, "parabuf"); | 404 | CODA_PARA_BUF_SIZE, "parabuf"); |
405 | if (ret < 0) { | 405 | if (ret < 0) |
406 | v4l2_err(&dev->v4l2_dev, "failed to allocate parabuf"); | ||
407 | return ret; | 406 | return ret; |
408 | } | ||
409 | } | 407 | } |
410 | 408 | ||
411 | if (dev->devtype->product == CODA_DX6) | 409 | if (dev->devtype->product == CODA_DX6) |
@@ -417,22 +415,15 @@ static int coda_alloc_context_buffers(struct coda_ctx *ctx, | |||
417 | DIV_ROUND_UP(q_data->height, 16)) * 3200 / 8 + 512; | 415 | DIV_ROUND_UP(q_data->height, 16)) * 3200 / 8 + 512; |
418 | ret = coda_alloc_context_buf(ctx, &ctx->slicebuf, size, | 416 | ret = coda_alloc_context_buf(ctx, &ctx->slicebuf, size, |
419 | "slicebuf"); | 417 | "slicebuf"); |
420 | if (ret < 0) { | 418 | if (ret < 0) |
421 | v4l2_err(&dev->v4l2_dev, | ||
422 | "failed to allocate %d byte slice buffer", | ||
423 | ctx->slicebuf.size); | ||
424 | goto err; | 419 | goto err; |
425 | } | ||
426 | } | 420 | } |
427 | 421 | ||
428 | if (!ctx->psbuf.vaddr && dev->devtype->product == CODA_7541) { | 422 | if (!ctx->psbuf.vaddr && dev->devtype->product == CODA_7541) { |
429 | ret = coda_alloc_context_buf(ctx, &ctx->psbuf, | 423 | ret = coda_alloc_context_buf(ctx, &ctx->psbuf, |
430 | CODA7_PS_BUF_SIZE, "psbuf"); | 424 | CODA7_PS_BUF_SIZE, "psbuf"); |
431 | if (ret < 0) { | 425 | if (ret < 0) |
432 | v4l2_err(&dev->v4l2_dev, | ||
433 | "failed to allocate psmem buffer"); | ||
434 | goto err; | 426 | goto err; |
435 | } | ||
436 | } | 427 | } |
437 | 428 | ||
438 | if (!ctx->workbuf.vaddr) { | 429 | if (!ctx->workbuf.vaddr) { |
@@ -442,12 +433,8 @@ static int coda_alloc_context_buffers(struct coda_ctx *ctx, | |||
442 | size += CODA9_PS_SAVE_SIZE; | 433 | size += CODA9_PS_SAVE_SIZE; |
443 | ret = coda_alloc_context_buf(ctx, &ctx->workbuf, size, | 434 | ret = coda_alloc_context_buf(ctx, &ctx->workbuf, size, |
444 | "workbuf"); | 435 | "workbuf"); |
445 | if (ret < 0) { | 436 | if (ret < 0) |
446 | v4l2_err(&dev->v4l2_dev, | ||
447 | "failed to allocate %d byte context buffer", | ||
448 | ctx->workbuf.size); | ||
449 | goto err; | 437 | goto err; |
450 | } | ||
451 | } | 438 | } |
452 | 439 | ||
453 | return 0; | 440 | return 0; |
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index ae7a35148b84..9b46088c8c7b 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c | |||
@@ -1932,10 +1932,8 @@ static void coda_fw_callback(const struct firmware *fw, void *context) | |||
1932 | /* allocate auxiliary per-device code buffer for the BIT processor */ | 1932 | /* allocate auxiliary per-device code buffer for the BIT processor */ |
1933 | ret = coda_alloc_aux_buf(dev, &dev->codebuf, fw->size, "codebuf", | 1933 | ret = coda_alloc_aux_buf(dev, &dev->codebuf, fw->size, "codebuf", |
1934 | dev->debugfs_root); | 1934 | dev->debugfs_root); |
1935 | if (ret < 0) { | 1935 | if (ret < 0) |
1936 | dev_err(&pdev->dev, "failed to allocate code buffer\n"); | ||
1937 | goto put_pm; | 1936 | goto put_pm; |
1938 | } | ||
1939 | 1937 | ||
1940 | /* Copy the whole firmware image to the code buffer */ | 1938 | /* Copy the whole firmware image to the code buffer */ |
1941 | memcpy(dev->codebuf.vaddr, fw->data, fw->size); | 1939 | memcpy(dev->codebuf.vaddr, fw->data, fw->size); |
@@ -2173,20 +2171,16 @@ static int coda_probe(struct platform_device *pdev) | |||
2173 | ret = coda_alloc_aux_buf(dev, &dev->workbuf, | 2171 | ret = coda_alloc_aux_buf(dev, &dev->workbuf, |
2174 | dev->devtype->workbuf_size, "workbuf", | 2172 | dev->devtype->workbuf_size, "workbuf", |
2175 | dev->debugfs_root); | 2173 | dev->debugfs_root); |
2176 | if (ret < 0) { | 2174 | if (ret < 0) |
2177 | dev_err(&pdev->dev, "failed to allocate work buffer\n"); | ||
2178 | goto err_v4l2_register; | 2175 | goto err_v4l2_register; |
2179 | } | ||
2180 | } | 2176 | } |
2181 | 2177 | ||
2182 | if (dev->devtype->tempbuf_size) { | 2178 | if (dev->devtype->tempbuf_size) { |
2183 | ret = coda_alloc_aux_buf(dev, &dev->tempbuf, | 2179 | ret = coda_alloc_aux_buf(dev, &dev->tempbuf, |
2184 | dev->devtype->tempbuf_size, "tempbuf", | 2180 | dev->devtype->tempbuf_size, "tempbuf", |
2185 | dev->debugfs_root); | 2181 | dev->debugfs_root); |
2186 | if (ret < 0) { | 2182 | if (ret < 0) |
2187 | dev_err(&pdev->dev, "failed to allocate temp buffer\n"); | ||
2188 | goto err_v4l2_register; | 2183 | goto err_v4l2_register; |
2189 | } | ||
2190 | } | 2184 | } |
2191 | 2185 | ||
2192 | dev->iram.size = dev->devtype->iram_size; | 2186 | dev->iram.size = dev->devtype->iram_size; |