Merge tag 'iwlwifi-next-for-kalle-2014-12-30' of https://git.kernel.org/pub/scm/linux...
[cascardo/linux.git] / drivers / thermal / rcar_thermal.c
index 5a37940..8803e69 100644 (file)
@@ -374,10 +374,8 @@ static int rcar_thermal_probe(struct platform_device *pdev)
        int idle = IDLE_INTERVAL;
 
        common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL);
-       if (!common) {
-               dev_err(dev, "Could not allocate common\n");
+       if (!common)
                return -ENOMEM;
-       }
 
        INIT_LIST_HEAD(&common->head);
        spin_lock_init(&common->lock);
@@ -423,7 +421,6 @@ static int rcar_thermal_probe(struct platform_device *pdev)
 
                priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
                if (!priv) {
-                       dev_err(dev, "Could not allocate priv\n");
                        ret = -ENOMEM;
                        goto error_unregister;
                }
@@ -470,7 +467,7 @@ error_unregister:
                        rcar_thermal_irq_disable(priv);
        }
 
-       pm_runtime_put_sync(dev);
+       pm_runtime_put(dev);
        pm_runtime_disable(dev);
 
        return ret;
@@ -488,7 +485,7 @@ static int rcar_thermal_remove(struct platform_device *pdev)
                        rcar_thermal_irq_disable(priv);
        }
 
-       pm_runtime_put_sync(dev);
+       pm_runtime_put(dev);
        pm_runtime_disable(dev);
 
        return 0;