]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: ccs: The functions to get compose or crop rectangle never return NULL
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 27 May 2020 23:02:07 +0000 (01:02 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 3 Dec 2020 11:27:31 +0000 (12:27 +0100)
The NULL check is not needed as the functions do not return NULL. Remove
the check (and BUG).

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ccs/ccs-core.c

index dec248fe7cc12c58d9c48144443c39f1872d9844..25b4c84524fff44a8269d348f4e503aa845f9219 100644 (file)
@@ -1766,16 +1766,12 @@ static void ccs_get_crop_compose(struct v4l2_subdev *subdev,
                        *comps = &ssd->compose;
        } else {
                if (crops) {
-                       for (i = 0; i < subdev->entity.num_pads; i++) {
+                       for (i = 0; i < subdev->entity.num_pads; i++)
                                crops[i] = v4l2_subdev_get_try_crop(subdev, cfg, i);
-                               BUG_ON(!crops[i]);
-                       }
                }
-               if (comps) {
+               if (comps)
                        *comps = v4l2_subdev_get_try_compose(subdev, cfg,
                                                             CCS_PAD_SINK);
-                       BUG_ON(!*comps);
-               }
        }
 }