From: Sakari Ailus Date: Mon, 7 May 2018 12:37:48 +0000 (-0400) Subject: media: omap3isp: Remove useless NULL check in omap3isp_stat_config X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=170df32cadee0bc6eb6098a8cf4234ef1dc12f66;p=openwrt%2Fstaging%2Fblogic.git media: omap3isp: Remove useless NULL check in omap3isp_stat_config 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" Suggested-by: Laurent Pinchart Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/omap3isp/ispstat.c b/drivers/media/platform/omap3isp/ispstat.c index 6af7460a3559..c70f118513f3 100644 --- a/drivers/media/platform/omap3isp/ispstat.c +++ b/drivers/media/platform/omap3isp/ispstat.c @@ -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,