diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-03-26 22:12:49 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-03 16:15:30 +0200 |
commit | d86fb45b5c52d8f2a3e78e81afd85a2a9d4478d7 (patch) | |
tree | 868fe4e57c07519ee047e519530391e30565f55a /drivers/mcb/mcb-pci.c | |
parent | 127af8828518074ab24e9b5678229513d198d832 (diff) | |
download | linux-d86fb45b5c52d8f2a3e78e81afd85a2a9d4478d7.tar.gz linux-d86fb45b5c52d8f2a3e78e81afd85a2a9d4478d7.tar.xz |
mcb: request_mem_region() returns NULL on error
The code here is checking for IS_ERR() when request_mem_region() only
returns NULL on error and never an ERR_PTR.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mcb/mcb-pci.c')
-rw-r--r-- | drivers/mcb/mcb-pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mcb/mcb-pci.c b/drivers/mcb/mcb-pci.c index 0af7361e377f..de36237d7c6b 100644 --- a/drivers/mcb/mcb-pci.c +++ b/drivers/mcb/mcb-pci.c @@ -56,9 +56,9 @@ static int mcb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) res = request_mem_region(priv->mapbase, CHAM_HEADER_SIZE, KBUILD_MODNAME); - if (IS_ERR(res)) { + if (!res) { dev_err(&pdev->dev, "Failed to request PCI memory\n"); - ret = PTR_ERR(res); + ret = -EBUSY; goto out_disable; } |