aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2015-01-23 13:51:25 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-02-02 10:24:57 -0200
commit31db5adb4ea78976c5e1c2c7aa386e494872e8c1 (patch)
treeb3c059589769d9c4f091dded8c151dd431471333 /drivers/media/platform
parent[media] coda: clear RET_DEC_PIC_SUCCESS flag in prepare_decode (diff)
downloadlinux-dev-31db5adb4ea78976c5e1c2c7aa386e494872e8c1.tar.xz
linux-dev-31db5adb4ea78976c5e1c2c7aa386e494872e8c1.zip
[media] coda: fix width validity check when starting to decode
Compare rounded up width to fit into bytesperline. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> 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>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/coda/coda-bit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index d81635d272de..6ecfd29b7d98 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -1431,9 +1431,10 @@ static int __coda_start_decoding(struct coda_ctx *ctx)
height = val & CODA7_PICHEIGHT_MASK;
}
- if (width > q_data_dst->width || height > q_data_dst->height) {
+ if (width > q_data_dst->bytesperline || height > q_data_dst->height) {
v4l2_err(&dev->v4l2_dev, "stream is %dx%d, not %dx%d\n",
- width, height, q_data_dst->width, q_data_dst->height);
+ width, height, q_data_dst->bytesperline,
+ q_data_dst->height);
return -EINVAL;
}