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>

authored by

Miloslav Trmac and committed by
Dmitry Torokhov
c28c3583 ebbac7dd

+3 -3
+3 -3
drivers/input/misc/wistron_btns.c
··· 92 preempt_enable(); 93 } 94 95 - static size_t __init locate_wistron_bios(void __iomem *base) 96 { 97 static const unsigned char __initdata signature[] = 98 { 0x42, 0x21, 0x55, 0x30 }; 99 - size_t offset; 100 101 for (offset = 0; offset < 0x10000; offset += 0x10) { 102 if (check_signature(base + offset, signature, ··· 109 static int __init map_bios(void) 110 { 111 void __iomem *base; 112 - size_t offset; 113 u32 entry_point; 114 115 base = ioremap(0xF0000, 0x10000); /* Can't fail */
··· 92 preempt_enable(); 93 } 94 95 + static ssize_t __init locate_wistron_bios(void __iomem *base) 96 { 97 static const unsigned char __initdata signature[] = 98 { 0x42, 0x21, 0x55, 0x30 }; 99 + ssize_t offset; 100 101 for (offset = 0; offset < 0x10000; offset += 0x10) { 102 if (check_signature(base + offset, signature, ··· 109 static int __init map_bios(void) 110 { 111 void __iomem *base; 112 + ssize_t offset; 113 u32 entry_point; 114 115 base = ioremap(0xF0000, 0x10000); /* Can't fail */