aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/wistron_btns.c
diff options
context:
space:
mode:
authorMiloslav Trmac <mitr@volny.cz>2006-01-10 01:59:07 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-01-10 01:59:07 -0500
commitc28c3583679c181a03910b6356228e99fcc27167 (patch)
treee3c7db6f714a909511c52e4625d0f31ad513a5d0 /drivers/input/misc/wistron_btns.c
parentebbac7dde2f5c6b4bd219573f840d4b3952e6220 (diff)
Input: wistron - do not crash if BIOS does not support interface
offset can never be < 0 because it has type size_t. The driver currently oopses on insmod if BIOS does not support the interface, instead of refusing to load. Signed-off-by: Miloslav Trmac <mitr@volny.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc/wistron_btns.c')
-rw-r--r--drivers/input/misc/wistron_btns.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c
index a05b8557842f..4b415d9b0123 100644
--- a/drivers/input/misc/wistron_btns.c
+++ b/drivers/input/misc/wistron_btns.c
@@ -92,11 +92,11 @@ static void call_bios(struct regs *regs)
92 preempt_enable(); 92 preempt_enable();
93} 93}
94 94
95static size_t __init locate_wistron_bios(void __iomem *base) 95static ssize_t __init locate_wistron_bios(void __iomem *base)
96{ 96{
97 static const unsigned char __initdata signature[] = 97 static const unsigned char __initdata signature[] =
98 { 0x42, 0x21, 0x55, 0x30 }; 98 { 0x42, 0x21, 0x55, 0x30 };
99 size_t offset; 99 ssize_t offset;
100 100
101 for (offset = 0; offset < 0x10000; offset += 0x10) { 101 for (offset = 0; offset < 0x10000; offset += 0x10) {
102 if (check_signature(base + offset, signature, 102 if (check_signature(base + offset, signature,
@@ -109,7 +109,7 @@ static size_t __init locate_wistron_bios(void __iomem *base)
109static int __init map_bios(void) 109static int __init map_bios(void)
110{ 110{
111 void __iomem *base; 111 void __iomem *base;
112 size_t offset; 112 ssize_t offset;
113 u32 entry_point; 113 u32 entry_point;
114 114
115 base = ioremap(0xF0000, 0x10000); /* Can't fail */ 115 base = ioremap(0xF0000, 0x10000); /* Can't fail */