Commit 4279a3c3 authored by Li Shaohua's avatar Li Shaohua Committed by Linus Torvalds

[PATCH] pc110pad.c request_region() fix

request_region() returns NULL if failed.  The driver gets it wrong.
Signed-off-by: default avatarLi Shaohua <shaoh.li@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f932ac44
...@@ -109,9 +109,9 @@ static int pc110pad_open(struct input_dev *dev) ...@@ -109,9 +109,9 @@ static int pc110pad_open(struct input_dev *dev)
static int __init pc110pad_init(void) static int __init pc110pad_init(void)
{ {
if (request_region(pc110pad_io, 4, "pc110pad")) if (!request_region(pc110pad_io, 4, "pc110pad")) {
{ printk(KERN_ERR "pc110pad: I/O area %#x-%#x in use.\n",
printk(KERN_ERR "pc110pad: I/O area %#x-%#x in use.\n", pc110pad_io, pc110pad_io + 4); pc110pad_io, pc110pad_io + 4);
return -EBUSY; return -EBUSY;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment