From: Dan Carpenter <error27@gmail.com>
To: linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: [patch -next 2/2] media/s2255drv: remove dead code
Date: Wed, 5 May 2010 08:00:47 +0200 [thread overview]
Message-ID: <20100505060047.GF27064@bicker> (raw)
My concern initially was we dereference "dev" in the parameter list to
s2255_dev_err() but it turns out that code path is never used.
The s2255_stop_readpipe() is only called from one place and "dev" is
never null. So this patch just removes the whole condition here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c
index ac9c40c..3c7a79f 100644
--- a/drivers/media/video/s2255drv.c
+++ b/drivers/media/video/s2255drv.c
@@ -2524,10 +2528,7 @@ static int s2255_stop_acquire(struct s2255_dev *dev, unsigned long chn)
static void s2255_stop_readpipe(struct s2255_dev *dev)
{
struct s2255_pipeinfo *pipe = &dev->pipe;
- if (dev == NULL) {
- s2255_dev_err(&dev->udev->dev, "invalid device\n");
- return;
- }
+
pipe->state = 0;
if (pipe->stream_urb) {
/* cancel urb */
reply other threads:[~2010-05-05 6:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20100505060047.GF27064@bicker \
--to=error27@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.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