Skip to contentSkip to conversation

x86: fix sparse warning in kernel/scx200_32.c

PATCH Applied Harvey Harrison 2 participants 2 messages Jan 31, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: fix sparse warning in kernel/scx200_32.c

arch/x86/kernel/scx200_32.c:68:72: warning: Using plain integer as NULL pointer

---
 arch/x86/kernel/scx200_32.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/scx200_32.c +1 -1
index 87bc159..7e004ac 100644
@@ -65,7 +65,7 @@ static int __devinit scx200_probe(struct pci_dev *pdev, const struct pci_device_
 		base = pci_resource_start(pdev, 0);
 		printk(KERN_INFO NAME ": GPIO base 0x%x\n", base);
 
-		if (request_region(base, SCx200_GPIO_SIZE, "NatSemi SCx200 GPIO") == 0) {
+		if (!request_region(base, SCx200_GPIO_SIZE, "NatSemi SCx200 GPIO")) {
 			printk(KERN_ERR NAME ": can't allocate I/O for GPIOs\n");
 			return -EBUSY;
 		}
Signature · 1 line
1.5.4.rc4.1142.gf5a97
Applied
#1 lore raw
Quoted 2 lines · Harvey Harrison

arch/x86/kernel/scx200_32.c:68:72: warning: Using plain integer as NULL pointer

thanks, applied.

Ingo