summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/media/platform/coda
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/media/platform/coda')
-rw-r--r--kernel/drivers/media/platform/coda/coda-bit.c2
-rw-r--r--kernel/drivers/media/platform/coda/coda-common.c10
2 files changed, 5 insertions, 7 deletions
diff --git a/kernel/drivers/media/platform/coda/coda-bit.c b/kernel/drivers/media/platform/coda/coda-bit.c
index 654e964f8..d76511c1c 100644
--- a/kernel/drivers/media/platform/coda/coda-bit.c
+++ b/kernel/drivers/media/platform/coda/coda-bit.c
@@ -1342,7 +1342,7 @@ static void coda_finish_encode(struct coda_ctx *ctx)
/* Calculate bytesused field */
if (dst_buf->sequence == 0) {
- vb2_set_plane_payload(&dst_buf->vb2_buf, 0,
+ vb2_set_plane_payload(&dst_buf->vb2_buf, 0, wr_ptr - start_ptr +
ctx->vpu_header_size[0] +
ctx->vpu_header_size[1] +
ctx->vpu_header_size[2]);
diff --git a/kernel/drivers/media/platform/coda/coda-common.c b/kernel/drivers/media/platform/coda/coda-common.c
index 15516a6e3..323aad3c8 100644
--- a/kernel/drivers/media/platform/coda/coda-common.c
+++ b/kernel/drivers/media/platform/coda/coda-common.c
@@ -2119,14 +2119,12 @@ static int coda_probe(struct platform_device *pdev)
pdev_id = of_id ? of_id->data : platform_get_device_id(pdev);
- if (of_id) {
+ if (of_id)
dev->devtype = of_id->data;
- } else if (pdev_id) {
+ else if (pdev_id)
dev->devtype = &coda_devdata[pdev_id->driver_data];
- } else {
- ret = -EINVAL;
- goto err_v4l2_register;
- }
+ else
+ return -EINVAL;
spin_lock_init(&dev->irqlock);
INIT_LIST_HEAD(&dev->instances);