From: Pan Bian <bianpan201603@163.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Karsten Keil <isdn@linux-pingi.de>,
netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Pan Bian <bianpan2016@163.com>
Subject: [PATCH 1/1 v2] isdn: hisax: set error code on failure
Date: Sun, 4 Dec 2016 18:43:31 +0800 [thread overview]
Message-ID: <1480848211-15969-1-git-send-email-bianpan201603@163.com> (raw)
From: Pan Bian <bianpan2016@163.com>
In function hfc4s8s_probe(), the value of return variable err should be
negative on failures. However, when the call to request_region() returns
NULL, the value of err is 0. This patch fixes the bug, assigning
"-EBUSY" to err on the path that request_region() fails.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188931
Signed-off-by: Pan Bian <bianpan2016@163.com>
---
drivers/isdn/hisax/hfc4s8s_l1.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
index 9600cd7..3172cee 100644
--- a/drivers/isdn/hisax/hfc4s8s_l1.c
+++ b/drivers/isdn/hisax/hfc4s8s_l1.c
@@ -1499,6 +1499,7 @@ struct hfc4s8s_l1 {
printk(KERN_INFO
"HFC-4S/8S: failed to request address space at 0x%04x\n",
hw->iobase);
+ err = -EBUSY;
goto out;
}
--
1.9.1
next reply other threads:[~2016-12-04 10:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-04 10:43 Pan Bian [this message]
2016-12-05 20:04 ` [PATCH 1/1 v2] isdn: hisax: set error code on failure David Miller
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=1480848211-15969-1-git-send-email-bianpan201603@163.com \
--to=bianpan201603@163.com \
--cc=bianpan2016@163.com \
--cc=isdn@linux-pingi.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/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).