media: atomisp: don't store an unused sink data on a var
authorMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 24 Sep 2022 09:10:22 +0000 (11:10 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 24 Sep 2022 09:21:43 +0000 (11:21 +0200)
Fixes this Werror breakage:

drivers/staging/media/atomisp/pci/atomisp_ioctl.c: In function 'atomisp_streamon':
drivers/staging/media/atomisp/pci/atomisp_ioctl.c:1714:44: error: variable 'sink' set but not used [-Werror=unused-but-set-variable]
 1714 |                 struct v4l2_mbus_framefmt *sink;
      |                                            ^~~~

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_ioctl.c

index aefa7c0..0ddb0ed 100644 (file)
@@ -1711,11 +1711,9 @@ start_sensor:
 
 start_delay_wq:
        if (asd->continuous_mode->val) {
-               struct v4l2_mbus_framefmt *sink;
-
-               sink = atomisp_subdev_get_ffmt(&asd->subdev, NULL,
-                                              V4L2_SUBDEV_FORMAT_ACTIVE,
-                                              ATOMISP_SUBDEV_PAD_SINK);
+               atomisp_subdev_get_ffmt(&asd->subdev, NULL,
+                                       V4L2_SUBDEV_FORMAT_ACTIVE,
+                                       ATOMISP_SUBDEV_PAD_SINK);
 
                reinit_completion(&asd->init_done);
                asd->delayed_init = ATOMISP_DELAYED_INIT_QUEUED;