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

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

Fixes: 46f934c9a1 ("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>
This commit is contained in:
Dan Carpenter 2018-11-26 11:12:29 +03:00 committed by Greg Kroah-Hartman
parent d39c02a658
commit 97a64ba77d

View File

@ -140,8 +140,8 @@ static int pvpanic_mmio_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
base = devm_ioremap_resource(&pdev->dev, mem); base = devm_ioremap_resource(&pdev->dev, mem);
if (base == NULL) if (IS_ERR(base))
return -EFAULT; return PTR_ERR(base);
atomic_notifier_chain_register(&panic_notifier_list, atomic_notifier_chain_register(&panic_notifier_list,
&pvpanic_panic_nb); &pvpanic_panic_nb);