mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
mfd: Add missing out of memory check for pcf50633
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44561 Reported-by: <[email protected]> Cc: Lars-Peter Clausen <[email protected]> Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
ad95ad10b0
commit
18273c5b46
1 changed files with 7 additions and 2 deletions
|
|
@ -253,8 +253,13 @@ static int __devinit pcf50633_probe(struct i2c_client *client,
|
|||
}
|
||||
|
||||
pdev->dev.parent = pcf->dev;
|
||||
platform_device_add_data(pdev, &pdata->reg_init_data[i],
|
||||
sizeof(pdata->reg_init_data[i]));
|
||||
if (platform_device_add_data(pdev, &pdata->reg_init_data[i],
|
||||
sizeof(pdata->reg_init_data[i])) < 0) {
|
||||
platform_device_put(pdev);
|
||||
dev_err(pcf->dev, "Out of memory for regulator parameters %d\n",
|
||||
i);
|
||||
continue;
|
||||
}
|
||||
pcf->regulator_pdev[i] = pdev;
|
||||
|
||||
platform_device_add(pdev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue