Skip to content

Commit

Permalink
isdn: hisax: set error code on failure
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
SinkFinder authored and davem330 committed Dec 5, 2016
1 parent 005f7e6 commit 9a53682
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/isdn/hisax/hfc4s8s_l1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,7 @@ hfc4s8s_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
printk(KERN_INFO
"HFC-4S/8S: failed to request address space at 0x%04x\n",
hw->iobase);
err = -EBUSY;
goto out;
}

Expand Down

0 comments on commit 9a53682

Please sign in to comment.