[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5htyli811o.wl%tiwai@suse.de>
Date: Wed, 22 Sep 2010 13:34:11 +0200
From: Takashi Iwai <tiwai@...e.de>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Samu Onkalo <samu.p.onkalo@...ia.com>,
Éric Piel <Eric.Piel@...mplin-utc.net>,
linux-kernel@...r.kernel.org
Subject: [PATCH resent] lis3: Fix Oops with NULL platform data
The recent addition of threaded irq handler causes a NULL dereference
when used with hp_accel driver, which has NULL pdata.
Cc: <stable@...nel.org>
Signed-off-by: Takashi Iwai <tiwai@...e.de>
---
This should go to 2.6.36 and 2.6.35-stable tree.
drivers/hwmon/lis3lv02d.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c
index 5e15967..1c266ec 100644
--- a/drivers/hwmon/lis3lv02d.c
+++ b/drivers/hwmon/lis3lv02d.c
@@ -354,7 +354,8 @@ static irqreturn_t lis302dl_interrupt_thread1_8b(int irq, void *data)
struct lis3lv02d *lis3 = data;
- if ((lis3->pdata->irq_cfg & LIS3_IRQ1_MASK) == LIS3_IRQ1_CLICK)
+ if (lis3->pdata &&
+ (lis3->pdata->irq_cfg & LIS3_IRQ1_MASK) == LIS3_IRQ1_CLICK)
lis302dl_interrupt_handle_click(lis3);
else
lis302dl_interrupt_handle_ff_wu(lis3);
@@ -367,7 +368,8 @@ static irqreturn_t lis302dl_interrupt_thread2_8b(int irq, void *data)
struct lis3lv02d *lis3 = data;
- if ((lis3->pdata->irq_cfg & LIS3_IRQ2_MASK) == LIS3_IRQ2_CLICK)
+ if (lis3->pdata &&
+ (lis3->pdata->irq_cfg & LIS3_IRQ2_MASK) == LIS3_IRQ2_CLICK)
lis302dl_interrupt_handle_click(lis3);
else
lis302dl_interrupt_handle_ff_wu(lis3);
--
1.7.2.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists