[PATCH 2/5] wistron: do not crash if BIOS does not support interface
- From: Dmitry Torokhov <dtor_core@xxxxxxxxxxxxx>
- Date: Tue, 10 Jan 2006 02:09:47 -0500
From: Miloslav Trmac <mitr@xxxxxxxx>
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@xxxxxxxx>
Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>
---
drivers/input/misc/wistron_btns.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: work/drivers/input/misc/wistron_btns.c
===================================================================
--- work.orig/drivers/input/misc/wistron_btns.c
+++ work/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
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 */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH 0/5] Tiny input update for 2.6.15
- From: Dmitry Torokhov
- [PATCH 0/5] Tiny input update for 2.6.15
- Prev by Date: [PATCH 5/5] ibmasm: fix input initialization error path
- Next by Date: Re: Why the DOS has many ntfs read and write driver,but the linux can't for a long time
- Previous by thread: [PATCH 5/5] ibmasm: fix input initialization error path
- Next by thread: [PATCH 3/5] Input core: prepare for fops constness
- Index(es):
Relevant Pages
|
Loading