cpufreq: s5pv210: Simplify with dev_err_probe()
[linux-2.6-microblaze.git] / drivers / cpufreq / s5pv210-cpufreq.c
index e84281e..7dccdb3 100644 (file)
@@ -590,6 +590,7 @@ static struct notifier_block s5pv210_cpufreq_reboot_notifier = {
 
 static int s5pv210_cpufreq_probe(struct platform_device *pdev)
 {
+       struct device *dev = &pdev->dev;
        struct device_node *np;
        int id, result = 0;
 
@@ -602,21 +603,14 @@ static int s5pv210_cpufreq_probe(struct platform_device *pdev)
         * cpufreq-dt driver.
         */
        arm_regulator = regulator_get(NULL, "vddarm");
-       if (IS_ERR(arm_regulator)) {
-               if (PTR_ERR(arm_regulator) == -EPROBE_DEFER)
-                       pr_debug("vddarm regulator not ready, defer\n");
-               else
-                       pr_err("failed to get regulator vddarm\n");
-               return PTR_ERR(arm_regulator);
-       }
+       if (IS_ERR(arm_regulator))
+               return dev_err_probe(dev, PTR_ERR(arm_regulator),
+                                    "failed to get regulator vddarm\n");
 
        int_regulator = regulator_get(NULL, "vddint");
        if (IS_ERR(int_regulator)) {
-               if (PTR_ERR(int_regulator) == -EPROBE_DEFER)
-                       pr_debug("vddint regulator not ready, defer\n");
-               else
-                       pr_err("failed to get regulator vddint\n");
-               result = PTR_ERR(int_regulator);
+               result = dev_err_probe(dev, PTR_ERR(int_regulator),
+                                      "failed to get regulator vddint\n");
                goto err_int_regulator;
        }