Commit d86fb45b authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 127af882
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment