Skip to content

Commit

Permalink
[media] bdisp: remove needless check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabien Dessenne authored and Mauro Carvalho Chehab committed Jun 10, 2015
1 parent 87b09bd commit 1a8b18a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/platform/sti/bdisp/bdisp-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 1a8b18a

Please sign in to comment.