From 8b661b508b3a4c8d9fc7a4b10507d3f1172947c3 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 5 May 2010 03:00:47 -0300 Subject: [PATCH] V4L/DVB: s2255drv: remove dead code 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 Cc: linux-dev@sensoray.com Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/s2255drv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index 1f9a49e054a8..3c7a79f3812a 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c @@ -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 */ -- 2.20.1