]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mmc: sdhci-dove: remove the unneeded error check
authorKevin Hao <haokexin@gmail.com>
Fri, 27 Feb 2015 07:47:25 +0000 (15:47 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 23 Mar 2015 13:13:32 +0000 (14:13 +0100)
The function clk_disable_unprepare() already take care of either error
or null cases.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-dove.c

index ca969d271a270bfb0bcb6e56fc3626f7398218a5..0a7aeb162497fb8872bf031417e12a6596e4b8cb 100644 (file)
@@ -117,8 +117,7 @@ static int sdhci_dove_probe(struct platform_device *pdev)
        return 0;
 
 err_sdhci_add:
-       if (!IS_ERR(priv->clk))
-               clk_disable_unprepare(priv->clk);
+       clk_disable_unprepare(priv->clk);
        sdhci_pltfm_free(pdev);
        return ret;
 }
@@ -131,8 +130,7 @@ static int sdhci_dove_remove(struct platform_device *pdev)
 
        sdhci_pltfm_unregister(pdev);
 
-       if (!IS_ERR(priv->clk))
-               clk_disable_unprepare(priv->clk);
+       clk_disable_unprepare(priv->clk);
 
        return 0;
 }