misc/pvpanic: fix a NULL vs IS_ERR() check
The devm_ioremap_resource() function doesn't return NULL, it returns
error pointers.
Fixes: 46f934c9a12f ("misc/pvpanic: add support to get pvpanic device info FDT")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/misc/pvpanic.c b/drivers/misc/pvpanic.c
index 01241ec..595ac06 100644
--- a/drivers/misc/pvpanic.c
+++ b/drivers/misc/pvpanic.c
@@ -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);