[media] dvb_usb_v2: fix power_ctrl() callback error handling
authorAntti Palosaari <crope@iki.fi>
Thu, 21 Jun 2012 05:57:34 +0000 (02:57 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 4 Aug 2012 10:56:38 +0000 (07:56 -0300)
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/dvb_usb_core.c

index 81ee3fc..93ce02a 100644 (file)
@@ -455,7 +455,8 @@ int dvb_usbv2_device_power_ctrl(struct dvb_usb_device *d, int onoff)
                pr_debug("%s: power control=%d\n", __func__, onoff);
                if (d->props->power_ctrl) {
                        ret = d->props->power_ctrl(d, onoff);
-                       goto err;
+                       if (ret < 0)
+                               goto err;
                }
        }