From: Antti Palosaari Date: Thu, 21 Jun 2012 05:57:34 +0000 (-0300) Subject: [media] dvb_usb_v2: fix power_ctrl() callback error handling X-Git-Tag: firefly_0821_release~3680^2~275^2~1616 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=18cfe03d320b3b36e60145c5896afd5d911f63b2;p=firefly-linux-kernel-4.4.55.git [media] dvb_usb_v2: fix power_ctrl() callback error handling Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/dvb-usb/dvb_usb_core.c b/drivers/media/dvb/dvb-usb/dvb_usb_core.c index 81ee3fc09a48..93ce02a91189 100644 --- a/drivers/media/dvb/dvb-usb/dvb_usb_core.c +++ b/drivers/media/dvb/dvb-usb/dvb_usb_core.c @@ -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; } }