Re: [PATCH] imx7: fix smatch error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hans,
Thanks for the patch.

On Wed 20 Feb 2019 at 08:59, Hans Verkuil wrote:
Fixes this smatch error:

drivers/staging/media/imx/imx7-mipi-csis.c:716 mipi_csis_set_fmt() error: we previously assumed 'fmt' could beor null (see line 709)

fmt is never NULL, so remove the 'fmt &&' condition.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>

Reviewed-by: Rui Miguel Silva <rmfrfs@xxxxxxxxx>

---
Cheers,
	Rui

---
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;
 	}




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux