mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
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:
parent
d39c02a658
commit
97a64ba77d
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue