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
This commit is contained in:
commit
06a57f4f20
@ -175,8 +175,14 @@ static int __devinit wm97xx_bat_probe(struct platform_device *dev)
|
|||||||
dev_err(&dev->dev, "Do not pass platform_data through "
|
dev_err(&dev->dev, "Do not pass platform_data through "
|
||||||
"wm97xx_bat_set_pdata!\n");
|
"wm97xx_bat_set_pdata!\n");
|
||||||
return -EINVAL;
|
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)
|
if (dev->id != -1)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user