public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] imx7: fix smatch error
@ 2019-02-20  8:59 Hans Verkuil
  2019-02-20 11:25 ` Rui Miguel Silva
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2019-02-20  8:59 UTC (permalink / raw)
  To: Linux Media Mailing List, Rui Miguel Silva, Steve Longerbeam

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 <hverkuil-cisco@xs4all.nl>
---
diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
index f4674de09e83..a5f7bbc41c61 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;
 	}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-20 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-20  8:59 [PATCH] imx7: fix smatch error Hans Verkuil
2019-02-20 11:25 ` Rui Miguel Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox