From bac26a63f9bff338534610232c2827b877e0b312 Mon Sep 17 00:00:00 2001 From: Victor Toso Date: Tue, 30 Oct 2018 12:14:49 -0400 Subject: [PATCH] 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 --- drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; } } -- 2.30.2