[media] af9035: add missing error check
authorAntti Palosaari <crope@iki.fi>
Sun, 1 Apr 2012 14:06:23 +0000 (11:06 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 9 Apr 2012 17:43:57 +0000 (14:43 -0300)
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/af9035.c

index 01dee02ff2805f3f3270b796d37e012f4f5eb566..dc0a49ac664a47689988a7e2df14dd148c4c7eb1 100644 (file)
@@ -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) {