From: Victor Toso Date: Tue, 30 Oct 2018 16:14:49 +0000 (-0400) Subject: media: dvb: Use WARM definition from identify_state() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=bac26a63f9bff338534610232c2827b877e0b312;p=openwrt%2Fstaging%2Fblogic.git media: dvb: Use WARM definition from identify_state() Device should be either COLD or WARM. This change only make usage of the existing definition. Signed-off-by: Victor Toso Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c index 3b8f7931b730..d55ef016d418 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c @@ -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; } }