From: Yang Li <yang.lee@linux.alibaba.com>
To: gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Yang Li <yang.lee@linux.alibaba.com>,
Abaci Robot <abaci@linux.alibaba.com>
Subject: [PATCH -next] usb: early: Fix an error code in xdbc_init()
Date: Tue, 21 Dec 2021 10:20:36 +0800 [thread overview]
Message-ID: <20211221022036.80706-1-yang.lee@linux.alibaba.com> (raw)
When xdbc_trace("hardware not used anymore\n") is performed,
ret should be assigned -ENODEV to indicate this.
Clean up smatch warning:
drivers/usb/early/xhci-dbc.c:972 xdbc_init() warn: missing error code
'ret'
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/usb/early/xhci-dbc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c
index 4502108069cd..fcb05a8948fa 100644
--- a/drivers/usb/early/xhci-dbc.c
+++ b/drivers/usb/early/xhci-dbc.c
@@ -969,6 +969,7 @@ static int __init xdbc_init(void)
if (early_xdbc_console.index == -1 ||
(early_xdbc_console.flags & CON_BOOT)) {
xdbc_trace("hardware not used anymore\n");
+ ret = -ENODEV;
goto free_and_quit;
}
--
2.20.1.7.g153144c
next reply other threads:[~2021-12-21 2:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 2:20 Yang Li [this message]
2021-12-21 6:37 ` [PATCH -next] usb: early: Fix an error code in xdbc_init() Greg KH
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=20211221022036.80706-1-yang.lee@linux.alibaba.com \
--to=yang.lee@linux.alibaba.com \
--cc=abaci@linux.alibaba.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.