[media] usb: au0828: remove redundant code
authorColin Ian King <colin.king@canonical.com>
Wed, 22 Mar 2017 16:32:01 +0000 (13:32 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 5 Apr 2017 18:10:07 +0000 (15:10 -0300)
The check for ret being non-zero is false as ret is always
zero, hence we have redundant dead code that can be removed.

Detected with CoverityScan, CID#112968 ("Constant' variable guards
dead code (DEADCODE)'")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/au0828/au0828-video.c

index 16f9125a985a2787687743c95d9911ddcb778029..2a255bd32bb39751d7b65f07380307384cc9a39c 100644 (file)
@@ -809,16 +809,9 @@ static void au0828_analog_stream_reset(struct au0828_dev *dev)
  */
 static int au0828_stream_interrupt(struct au0828_dev *dev)
 {
-       int ret = 0;
-
        dev->stream_state = STREAM_INTERRUPT;
        if (test_bit(DEV_DISCONNECTED, &dev->dev_state))
                return -ENODEV;
-       else if (ret) {
-               set_bit(DEV_MISCONFIGURED, &dev->dev_state);
-               dprintk(1, "%s device is misconfigured!\n", __func__);
-               return ret;
-       }
        return 0;
 }