diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-02-25 09:40:22 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-25 09:40:26 +0100 |
commit | 996de8c6fe95c5a9fc524241cc8f142ef0605d3d (patch) | |
tree | 0f637ab0d80d6d7e213707ac2d8c1cc16b69523c /drivers/power/wm97xx_battery.c | |
parent | rcu: Fix sparse warnings (diff) | |
parent | Linux 2.6.33 (diff) | |
download | linux-996de8c6fe95c5a9fc524241cc8f142ef0605d3d.tar.xz linux-996de8c6fe95c5a9fc524241cc8f142ef0605d3d.zip |
Merge commit 'v2.6.33' into core/rcu
Merge reason: Update from -rc4 to -final.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/power/wm97xx_battery.c')
-rw-r--r-- | drivers/power/wm97xx_battery.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/power/wm97xx_battery.c b/drivers/power/wm97xx_battery.c index fa39e759a275..6ea3cb5837c7 100644 --- a/drivers/power/wm97xx_battery.c +++ b/drivers/power/wm97xx_battery.c @@ -175,8 +175,14 @@ static int __devinit wm97xx_bat_probe(struct platform_device *dev) dev_err(&dev->dev, "Do not pass platform_data through " "wm97xx_bat_set_pdata!\n"); return -EINVAL; - } else - pdata = wmdata->batt_pdata; + } + + if (!wmdata) { + dev_err(&dev->dev, "No platform data supplied\n"); + return -EINVAL; + } + + pdata = wmdata->batt_pdata; if (dev->id != -1) return -EINVAL; |