summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorFabien Dessenne <fabien.dessenne@st.com>2015-06-10 07:19:37 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-06-10 12:29:55 -0300
commit1a8b18afa13f2772b1ae79de3831f0b81b4a0903 (patch)
tree68b7f0662e7b87dc1f67401eae0d1a3f373bb144 /drivers/media
parent87b09bd048924f5b830d57f719b0c62ec25bac32 (diff)
downloadop-kernel-dev-1a8b18afa13f2772b1ae79de3831f0b81b4a0903.zip
op-kernel-dev-1a8b18afa13f2772b1ae79de3831f0b81b4a0903.tar.gz
[media] bdisp: remove needless check
As reported by smatch: drivers/media/platform/sti/bdisp/bdisp-v4l2.c:947 bdisp_s_selection() warn: unsigned 'out.width' is never less than zero. drivers/media/platform/sti/bdisp/bdisp-v4l2.c:947 bdisp_s_selection() warn: unsigned 'out.height' is never less than zero. Indeed, width and height are unsigned. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/sti/bdisp/bdisp-v4l2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
index 89d7a22..9a8405c 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
@@ -944,8 +944,7 @@ static int bdisp_s_selection(struct file *file, void *fh,
out.width = ALIGN(in->width, frame->fmt->w_align);
out.height = ALIGN(in->height, frame->fmt->w_align);
- if ((out.width < 0) || (out.height < 0) ||
- ((out.left + out.width) > frame->width) ||
+ if (((out.left + out.width) > frame->width) ||
((out.top + out.height) > frame->height)) {
dev_err(ctx->bdisp_dev->dev,
"Invalid crop: %dx%d@(%d,%d) vs frame: %dx%d\n",
OpenPOWER on IntegriCloud