diff options
author | Pan Bian <bianpan2016@163.com> | 2016-12-04 05:43:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-05 15:03:42 -0500 |
commit | 9a53682b340b97642793271ba095cc9531a7b649 (patch) | |
tree | f72523e98bfd2ae3bf01591ee6bf6d29d1c49e75 /drivers/isdn/hisax/hfc4s8s_l1.c | |
parent | 005f7e68e74df94c2a676b5a3e98c6fb65aae606 (diff) |
isdn: hisax: set error code on failure
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hisax/hfc4s8s_l1.c')
-rw-r--r-- | drivers/isdn/hisax/hfc4s8s_l1.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c index 9600cd771f1a..e034ed847ff3 100644 --- a/drivers/isdn/hisax/hfc4s8s_l1.c +++ b/drivers/isdn/hisax/hfc4s8s_l1.c | |||
@@ -1499,6 +1499,7 @@ hfc4s8s_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1499 | printk(KERN_INFO | 1499 | printk(KERN_INFO |
1500 | "HFC-4S/8S: failed to request address space at 0x%04x\n", | 1500 | "HFC-4S/8S: failed to request address space at 0x%04x\n", |
1501 | hw->iobase); | 1501 | hw->iobase); |
1502 | err = -EBUSY; | ||
1502 | goto out; | 1503 | goto out; |
1503 | } | 1504 | } |
1504 | 1505 | ||