From: Antti Palosaari Date: Sun, 1 Apr 2012 14:06:23 +0000 (-0300) Subject: [media] af9035: add missing error check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=41d44a815a68a2618805c1d670b4ff93091a99d8;p=linux-beck.git [media] af9035: add missing error check Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/dvb-usb/af9035.c b/drivers/media/dvb/dvb-usb/af9035.c index 01dee02ff280..dc0a49ac664a 100644 --- a/drivers/media/dvb/dvb-usb/af9035.c +++ b/drivers/media/dvb/dvb-usb/af9035.c @@ -400,6 +400,8 @@ static int af9035_download_firmware(struct usb_device *udev, /* download begin packet */ req.cmd = CMD_FW_DL_BEGIN; ret = af9035_ctrl_msg(udev, &req); + if (ret < 0) + goto err; /* download firmware packet(s) */ for (j = HDR_SIZE + hdr_data_len; j > 0; j -= MAX_DATA) {