From c28c3583679c181a03910b6356228e99fcc27167 Mon Sep 17 00:00:00 2001 From: Miloslav Trmac Date: Tue, 10 Jan 2006 01:59:07 -0500 Subject: 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 Signed-off-by: Dmitry Torokhov --- drivers/input/misc/wistron_btns.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/input/misc') 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) preempt_enable(); } -static size_t __init locate_wistron_bios(void __iomem *base) +static ssize_t __init locate_wistron_bios(void __iomem *base) { static const unsigned char __initdata signature[] = { 0x42, 0x21, 0x55, 0x30 }; - size_t offset; + ssize_t offset; for (offset = 0; offset < 0x10000; offset += 0x10) { if (check_signature(base + offset, signature, @@ -109,7 +109,7 @@ static size_t __init locate_wistron_bios(void __iomem *base) static int __init map_bios(void) { void __iomem *base; - size_t offset; + ssize_t offset; u32 entry_point; base = ioremap(0xF0000, 0x10000); /* Can't fail */ -- cgit v1.2.3-59-g8ed1b