Merge branch 'next' into for-linus
[linux-2.6-microblaze.git] / drivers / iio / dac / dpot-dac.c
index 1a9609e..5d18194 100644 (file)
@@ -184,18 +184,14 @@ static int dpot_dac_probe(struct platform_device *pdev)
        indio_dev->num_channels = 1;
 
        dac->vref = devm_regulator_get(dev, "vref");
-       if (IS_ERR(dac->vref)) {
-               if (PTR_ERR(dac->vref) != -EPROBE_DEFER)
-                       dev_err(&pdev->dev, "failed to get vref regulator\n");
-               return PTR_ERR(dac->vref);
-       }
+       if (IS_ERR(dac->vref))
+               return dev_err_probe(&pdev->dev, PTR_ERR(dac->vref),
+                                    "failed to get vref regulator\n");
 
        dac->dpot = devm_iio_channel_get(dev, "dpot");
-       if (IS_ERR(dac->dpot)) {
-               if (PTR_ERR(dac->dpot) != -EPROBE_DEFER)
-                       dev_err(dev, "failed to get dpot input channel\n");
-               return PTR_ERR(dac->dpot);
-       }
+       if (IS_ERR(dac->dpot))
+               return dev_err_probe(&pdev->dev, PTR_ERR(dac->dpot),
+                                    "failed to get dpot input channel\n");
 
        ret = iio_get_channel_type(dac->dpot, &type);
        if (ret < 0)