diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c index 89d7a2279bc65a9b2b2d6300b747022256c22ea1..9a8405cd5216ddb543fcf7eda9da70750c7515d6 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",