summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/misc/pvpanic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/pvpanic.c b/drivers/misc/pvpanic.c
index 01241ec6a5cd..595ac065b401 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);