Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: b91c13534a63 ("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>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
05d36a59 4863cb2b

+2 -2
+2 -2
drivers/misc/cb710/core.c
··· 226 226 spin_lock_init(&chip->irq_lock); 227 227 chip->pdev = pdev; 228 228 chip->iobase = pcim_iomap_region(pdev, 0, KBUILD_MODNAME); 229 - if (!chip->iobase) 230 - return -ENOMEM; 229 + if (IS_ERR(chip->iobase)) 230 + return PTR_ERR(chip->iobase); 231 231 232 232 pci_set_drvdata(pdev, chip); 233 233