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

misc/pvpanic: fix a NULL vs IS_ERR() check

The devm_ioremap_resource() function doesn't return NULL, it returns
error pointers.

Fixes: 46f934c9 ("misc/pvpanic: add support to get pvpanic device info FDT")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d39c02a6
......@@ -140,8 +140,8 @@ static int pvpanic_mmio_probe(struct platform_device *pdev)
return -EINVAL;
base = devm_ioremap_resource(&pdev->dev, mem);
if (base == NULL)
return -EFAULT;
if (IS_ERR(base))
return PTR_ERR(base);
atomic_notifier_chain_register(&panic_notifier_list,
&pvpanic_panic_nb);
......
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