Skip to content

Commit

Permalink
V4L/DVB: s2255drv: remove dead code
Browse files Browse the repository at this point in the history
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>
Cc: linux-dev@sensoray.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed May 19, 2010
1 parent aab9796 commit 8b661b5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/media/video/s2255drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2528,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 */
Expand Down

0 comments on commit 8b661b5

Please sign in to comment.