Produce some error messages when internal buffer allocation
fails, for example because the CMA region is too small.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
        }
 
        ret = coda_alloc_framebuffers(ctx, q_data_dst, src_fourcc);
-       if (ret < 0)
+       if (ret < 0) {
+               v4l2_err(&dev->v4l2_dev, "failed to allocate framebuffers\n");
                return ret;
+       }
 
        /* Tell the decoder how many frame buffers we allocated. */
        coda_write(dev, ctx->num_internal_frames, CODA_CMD_SET_FRAME_BUF_NUM);
 
 {
        buf->vaddr = dma_alloc_coherent(&dev->plat_dev->dev, size, &buf->paddr,
                                        GFP_KERNEL);
-       if (!buf->vaddr)
+       if (!buf->vaddr) {
+               v4l2_err(&dev->v4l2_dev,
+                        "Failed to allocate %s buffer of size %u\n",
+                        name, size);
                return -ENOMEM;
+       }
 
        buf->size = size;