From: Victor Toso <victortoso@redhat.com>
To: linux-media@vger.kernel.org
Subject: [PATCH dvb v1 2/4] media: dvb: Use WARM definition from identify_state()
Date: Tue, 30 Oct 2018 17:14:49 +0100 [thread overview]
Message-ID: <20181030161451.4560-3-victortoso@redhat.com> (raw)
In-Reply-To: <20181030161451.4560-1-victortoso@redhat.com>
From: Victor Toso <me@victortoso.com>
Device should be either COLD or WARM.
This change only make usage of the existing definition.
Signed-off-by: Victor Toso <me@victortoso.com>
---
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.17.2
next prev parent reply other threads:[~2018-10-31 1:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 16:14 [PATCH dvb v1 0/4] miscellaneous changes Victor Toso
2018-10-30 16:14 ` [PATCH dvb v1 1/4] af9033: Remove duplicated switch statement Victor Toso
2018-10-30 16:14 ` Victor Toso [this message]
2018-10-30 16:14 ` [PATCH dvb v1 3/4] media: dvb-usb-v2: remove __func__ from dev_dbg() Victor Toso
2018-11-27 10:32 ` Sean Young
2018-12-04 9:56 ` Victor Toso
2018-10-30 16:14 ` [PATCH dvb v1 4/4] media: dvb_frontend: " Victor Toso
2018-11-27 10:33 ` Sean Young
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181030161451.4560-3-victortoso@redhat.com \
--to=victortoso@redhat.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).