diff options
Diffstat (limited to 'drivers/regulator')
| -rw-r--r-- | drivers/regulator/wm831x-ldo.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c index 46d6700467b5..eca0eeb78acd 100644 --- a/drivers/regulator/wm831x-ldo.c +++ b/drivers/regulator/wm831x-ldo.c | |||
| @@ -235,10 +235,8 @@ static int wm831x_gp_ldo_probe(struct platform_device *pdev) | |||
| 235 | dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); | 235 | dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); |
| 236 | 236 | ||
| 237 | ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL); | 237 | ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL); |
| 238 | if (ldo == NULL) { | 238 | if (!ldo) |
| 239 | dev_err(&pdev->dev, "Unable to allocate private data\n"); | ||
| 240 | return -ENOMEM; | 239 | return -ENOMEM; |
| 241 | } | ||
| 242 | 240 | ||
| 243 | ldo->wm831x = wm831x; | 241 | ldo->wm831x = wm831x; |
| 244 | 242 | ||
| @@ -447,10 +445,8 @@ static int wm831x_aldo_probe(struct platform_device *pdev) | |||
| 447 | dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); | 445 | dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); |
| 448 | 446 | ||
| 449 | ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL); | 447 | ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL); |
| 450 | if (ldo == NULL) { | 448 | if (!ldo) |
| 451 | dev_err(&pdev->dev, "Unable to allocate private data\n"); | ||
| 452 | return -ENOMEM; | 449 | return -ENOMEM; |
| 453 | } | ||
| 454 | 450 | ||
| 455 | ldo->wm831x = wm831x; | 451 | ldo->wm831x = wm831x; |
| 456 | 452 | ||
| @@ -594,10 +590,8 @@ static int wm831x_alive_ldo_probe(struct platform_device *pdev) | |||
| 594 | dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); | 590 | dev_dbg(&pdev->dev, "Probing LDO%d\n", id + 1); |
| 595 | 591 | ||
| 596 | ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL); | 592 | ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_ldo), GFP_KERNEL); |
| 597 | if (ldo == NULL) { | 593 | if (!ldo) |
| 598 | dev_err(&pdev->dev, "Unable to allocate private data\n"); | ||
| 599 | return -ENOMEM; | 594 | return -ENOMEM; |
| 600 | } | ||
| 601 | 595 | ||
| 602 | ldo->wm831x = wm831x; | 596 | ldo->wm831x = wm831x; |
| 603 | 597 | ||
