mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
misc: cb710: Fix a NULL vs IS_ERR() check in probe()
The pcim_iomap_region() function never returns NULL, it returns error
pointers. Update the checking to match.
Fixes: b91c13534a ("misc: cb710: Replace deprecated PCI functions")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/aQITFDPyuzjNN4GN@stanley.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4863cb2b0f
commit
05d36a5931
1 changed files with 2 additions and 2 deletions
|
|
@ -226,8 +226,8 @@ static int cb710_probe(struct pci_dev *pdev,
|
|||
spin_lock_init(&chip->irq_lock);
|
||||
chip->pdev = pdev;
|
||||
chip->iobase = pcim_iomap_region(pdev, 0, KBUILD_MODNAME);
|
||||
if (!chip->iobase)
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(chip->iobase))
|
||||
return PTR_ERR(chip->iobase);
|
||||
|
||||
pci_set_drvdata(pdev, chip);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue