linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1 v2] isdn: hisax: set error code on failure
@ 2016-12-04 10:43 Pan Bian
  2016-12-05 20:04 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Pan Bian @ 2016-12-04 10:43 UTC (permalink / raw)
  To: Sergei Shtylyov, Karsten Keil, netdev; +Cc: linux-kernel, Pan Bian

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1 v2] isdn: hisax: set error code on failure
  2016-12-04 10:43 [PATCH 1/1 v2] isdn: hisax: set error code on failure Pan Bian
@ 2016-12-05 20:04 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-12-05 20:04 UTC (permalink / raw)
  To: bianpan201603; +Cc: sergei.shtylyov, isdn, netdev, linux-kernel, bianpan2016

From: Pan Bian <bianpan201603@163.com>
Date: Sun,  4 Dec 2016 18:43:31 +0800

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-05 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-04 10:43 [PATCH 1/1 v2] isdn: hisax: set error code on failure Pan Bian
2016-12-05 20:04 ` David Miller

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).