]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
media: omap3isp: Remove useless NULL check in omap3isp_stat_config
authorSakari Ailus <sakari.ailus@linux.intel.com>
Mon, 7 May 2018 12:37:48 +0000 (08:37 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 9 May 2018 20:37:36 +0000 (16:37 -0400)
The omap3isp driver checked whether the second argument (the new
configuration) to the ISP statistics is NULL. This is the pointer to the
user-given argument and is never NULL. Remove the check.

Reported-by: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/omap3isp/ispstat.c

index 6af7460a355905cdc61bd9fedd60dd2365f2dcaf..c70f118513f30107cb2d4a896bbff8d5e290ec6f 100644 (file)
@@ -544,12 +544,6 @@ int omap3isp_stat_config(struct ispstat *stat, void *new_conf)
        struct ispstat_generic_config *user_cfg = new_conf;
        u32 buf_size = user_cfg->buf_size;
 
-       if (!new_conf) {
-               dev_dbg(stat->isp->dev, "%s: configuration is NULL\n",
-                       stat->subdev.name);
-               return -EINVAL;
-       }
-
        mutex_lock(&stat->ioctl_lock);
 
        dev_dbg(stat->isp->dev,