From 18cfe03d320b3b36e60145c5896afd5d911f63b2 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Thu, 21 Jun 2012 02:57:34 -0300 Subject: [PATCH] [media] dvb_usb_v2: fix power_ctrl() callback error handling Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/dvb-usb/dvb_usb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } } -- 2.39.5