[media] dw2102: fix unreleased firmware
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Mon, 7 Mar 2016 10:26:55 +0000 (07:26 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 13 Apr 2016 20:05:48 +0000 (17:05 -0300)
On the particular case when the product id is 0x2101 we have requested
for a firmware but after processing it we missed releasing it.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/dvb-usb/dw2102.c

index 6d0dd85..1f35f3d 100644 (file)
@@ -1843,6 +1843,9 @@ static int dw2102_load_firmware(struct usb_device *dev,
                msleep(100);
                kfree(p);
        }
+
+       if (le16_to_cpu(dev->descriptor.idProduct) == 0x2101)
+               release_firmware(fw);
        return ret;
 }