public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: laurent.pinchart@ideasonboard.com, mchehab@kernel.org
Subject: [PATCH 1/2] omap3isp: Remove useless NULL check in omap3isp_stat_config
Date: Mon,  7 May 2018 15:47:22 +0300	[thread overview]
Message-ID: <20180507124723.2153-2-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20180507124723.2153-1-sakari.ailus@linux.intel.com>

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>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/platform/omap3isp/ispstat.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/media/platform/omap3isp/ispstat.c b/drivers/media/platform/omap3isp/ispstat.c
index 529cd8fb29b1..34a91125da36 100644
--- a/drivers/media/platform/omap3isp/ispstat.c
+++ b/drivers/media/platform/omap3isp/ispstat.c
@@ -542,12 +542,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,
-- 
2.11.0

  reply	other threads:[~2018-05-07 12:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07 12:47 [PATCH 0/2] omap3isp cleanups Sakari Ailus
2018-05-07 12:47 ` Sakari Ailus [this message]
2018-05-07 13:21   ` [PATCH 1/2] omap3isp: Remove useless NULL check in omap3isp_stat_config Laurent Pinchart
2018-05-07 12:47 ` [PATCH 2/2] omap3isp: Don't use GFP_DMA Sakari Ailus
2018-05-07 13:21   ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180507124723.2153-2-sakari.ailus@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox