Message ID | 20190627222020.45909-1-willemdebruijn.kernel@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: gp8psk: check return value in gp8psk_power_ctrl | expand |
diff --git a/drivers/media/usb/dvb-usb/gp8psk.c b/drivers/media/usb/dvb-usb/gp8psk.c index 1282f701f1857..b666644f06d7b 100644 --- a/drivers/media/usb/dvb-usb/gp8psk.c +++ b/drivers/media/usb/dvb-usb/gp8psk.c @@ -184,9 +184,13 @@ static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff) { u8 status, buf; int gp_product_id = le16_to_cpu(d->udev->descriptor.idProduct); + int ret; if (onoff) { - gp8psk_usb_in_op(d, GET_8PSK_CONFIG,0,0,&status,1); + ret = gp8psk_usb_in_op(d, GET_8PSK_CONFIG, 0, 0, &status, 1); + if (ret) + return ret; + if (! (status & bm8pskStarted)) { /* started */ if(gp_product_id == USB_PID_GENPIX_SKYWALKER_CW3K) gp8psk_usb_out_op(d, CW3K_INIT, 1, 0, NULL, 0);