Merge branch 'parisc-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
[deliverable/linux.git] / drivers / regulator / wm831x-dcdc.c
index 04cf9c16ef233eae69fbdf209d09e0865f947a67..0d88a82ab2a227f835fa7d6b2b318b939e9e8737 100644 (file)
@@ -469,10 +469,8 @@ static int wm831x_buckv_probe(struct platform_device *pdev)
 
        dcdc = devm_kzalloc(&pdev->dev,  sizeof(struct wm831x_dcdc),
                            GFP_KERNEL);
-       if (dcdc == NULL) {
-               dev_err(&pdev->dev, "Unable to allocate private data\n");
+       if (!dcdc)
                return -ENOMEM;
-       }
 
        dcdc->wm831x = wm831x;
 
@@ -622,10 +620,8 @@ static int wm831x_buckp_probe(struct platform_device *pdev)
 
        dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc),
                            GFP_KERNEL);
-       if (dcdc == NULL) {
-               dev_err(&pdev->dev, "Unable to allocate private data\n");
+       if (!dcdc)
                return -ENOMEM;
-       }
 
        dcdc->wm831x = wm831x;
 
@@ -752,10 +748,8 @@ static int wm831x_boostp_probe(struct platform_device *pdev)
                return -ENODEV;
 
        dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL);
-       if (dcdc == NULL) {
-               dev_err(&pdev->dev, "Unable to allocate private data\n");
+       if (!dcdc)
                return -ENOMEM;
-       }
 
        dcdc->wm831x = wm831x;
 
@@ -842,10 +836,8 @@ static int wm831x_epe_probe(struct platform_device *pdev)
        dev_dbg(&pdev->dev, "Probing EPE%d\n", id + 1);
 
        dcdc = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_dcdc), GFP_KERNEL);
-       if (dcdc == NULL) {
-               dev_err(&pdev->dev, "Unable to allocate private data\n");
+       if (!dcdc)
                return -ENOMEM;
-       }
 
        dcdc->wm831x = wm831x;
 
This page took 0.025243 seconds and 5 git commands to generate.