x86: fix sparse warning in kernel/scx200_32.c

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, January 31, 2008 - 4:59 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=706b7e...
Commit:     706b7e1573d7b7ad7825e84a6dcfb3d533993b83
Parent:     1fd6a53ddc75d02ad0f363cb42f2a1cec6b701c2
Author:     Harvey Harrison <harvey.harrison@gmail.com>
AuthorDate: Thu Jan 31 22:05:45 2008 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu Jan 31 22:05:45 2008 +0100

    x86: fix sparse warning in kernel/scx200_32.c
    
    arch/x86/kernel/scx200_32.c:68:72: warning: Using plain integer as NULL pointer
    
    Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/scx200_32.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/scx200_32.c b/arch/x86/kernel/scx200_32.c
index 87bc159..7e004ac 100644
--- a/arch/x86/kernel/scx200_32.c
+++ b/arch/x86/kernel/scx200_32.c
@@ -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;
 		}
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
x86: fix sparse warning in kernel/scx200_32.c, Linux Kernel Mailing ..., (Thu Jan 31, 4:59 pm)