Commit 06a57f4f authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.infradead.org/users/cbou/battery-2.6.33

* git://git.infradead.org/users/cbou/battery-2.6.33:
  wm97xx_battery: Handle missing platform data gracefully
parents fd48d6c8 12b336a8
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment