[media] dvb_usb_lmedm04: don't crash if firmware is not loaded
authorMalcolm Priestley <tvboxspy@gmail.com>
Thu, 2 Aug 2012 22:31:53 +0000 (19:31 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Aug 2012 08:42:57 +0000 (05:42 -0300)
There is a missing error handling when no firmware file found.

It seems that this is more of a problem with udev-182+.

However, so far udev-182 is only a problem on first ever plug.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/lmedm04.c

index 25d1031460f8071deaa2bd0e9a5e14879824fb37..26ba5bc92c615a068bcea4e42328d8b3629d1168 100644 (file)
@@ -878,6 +878,10 @@ static int lme_firmware_switch(struct usb_device *udev, int cold)
                fw_lme = fw_c_rs2000;
                ret = request_firmware(&fw, fw_lme, &udev->dev);
                dvb_usb_lme2510_firmware = TUNER_RS2000;
+               if (ret == 0)
+                       break;
+               info("FRM No Firmware Found - please install");
+               cold_fw = 0;
                break;
        default:
                fw_lme = fw_c_s7395;