media: dvb: Use WARM definition from identify_state()
authorVictor Toso <me@victortoso.com>
Tue, 30 Oct 2018 16:14:49 +0000 (12:14 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 3 Dec 2018 18:26:21 +0000 (13:26 -0500)
Device should be either COLD or WARM.
This change only make usage of the existing definition.

Signed-off-by: Victor Toso <me@victortoso.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c

index 3b8f7931b7306178f5854b5a2ea2608f8faeb25e..d55ef016d4187e604e0e987e32db7603c4e3c028 100644 (file)
@@ -957,9 +957,7 @@ int dvb_usbv2_probe(struct usb_interface *intf,
        if (d->props->identify_state) {
                const char *name = NULL;
                ret = d->props->identify_state(d, &name);
-               if (ret == 0) {
-                       ;
-               } else if (ret == COLD) {
+               if (ret == COLD) {
                        dev_info(&d->udev->dev,
                                        "%s: found a '%s' in cold state\n",
                                        KBUILD_MODNAME, d->name);
@@ -984,7 +982,7 @@ int dvb_usbv2_probe(struct usb_interface *intf,
                        } else {
                                goto err_free_all;
                        }
-               } else {
+               } else if (ret != WARM) {
                        goto err_free_all;
                }
        }