From: Hans Verkuil Date: Wed, 20 Feb 2019 08:59:00 +0000 (-0500) Subject: media: imx7: fix smatch error X-Git-Tag: v5.4-rc1~956^2~222 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3bb7b493198353142c0acb4ed95cddd17a2c5d16;p=platform%2Fkernel%2Flinux-rpi.git media: imx7: fix smatch error Fixes this smatch error: drivers/staging/media/imx/imx7-mipi-csis.c:716 mipi_csis_set_fmt() error: we previously assumed 'fmt' could be null (see line 709) fmt is never NULL, so remove the 'fmt &&' condition. Signed-off-by: Hans Verkuil Reviewed-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index 2ddcc42..e1f2ef1 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -706,7 +706,7 @@ static int mipi_csis_set_fmt(struct v4l2_subdev *mipi_sd, fmt = mipi_csis_get_format(state, cfg, sdformat->which, sdformat->pad); mutex_lock(&state->lock); - if (fmt && sdformat->pad == CSIS_PAD_SOURCE) { + if (sdformat->pad == CSIS_PAD_SOURCE) { sdformat->format = *fmt; goto unlock; }