]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mmc: pwrseq_simple: remove unused variables (no functional change)
authorLothar Waßmann <LW@KARO-electronics.de>
Thu, 5 Jan 2017 13:25:07 +0000 (14:25 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 7 Mar 2017 11:41:07 +0000 (12:41 +0100)
The variable 'i' in mmc_pwrseq_simple_alloc() is unused and 'ret' is
used only once in a way that makes it unnecessary, so remove both
variables.

drivers/mmc/core/pwrseq_simple.c

index 8fb4ed9e7e014fd70ef4223d4e9b6ca402fcd3c2..3d48d194eb26c3543aed72bfcad81abe54df2b38 100644 (file)
@@ -89,20 +89,17 @@ int mmc_pwrseq_simple_alloc(struct mmc_host *host)
 {
        struct mmc_pwrseq_simple *pwrseq = to_pwrseq_simple(host->pwrseq);
        struct device *dev = host->pwrseq->dev;
-       int i, ret = 0;
 
        pwrseq->ext_clk = clk_get(dev, "ext_clock");
        if (IS_ERR(pwrseq->ext_clk) &&
            PTR_ERR(pwrseq->ext_clk) != -ENOENT) {
                return PTR_ERR(pwrseq->ext_clk);
-       
        }
 
        pwrseq->reset_gpios = gpiod_get_array(dev, "reset", GPIOD_OUT_HIGH);
        if (IS_ERR(pwrseq->reset_gpios)) {
-               ret = PTR_ERR(pwrseq->reset_gpios);
                clk_put(pwrseq->ext_clk);
-               return ret;
+               return  PTR_ERR(pwrseq->reset_gpios);
        }
 
        return 0;