mmc: host: mxcmmc: Simplify a trivial if-return sequence
authorFabio Estevam <fabio.estevam@freescale.com>
Sat, 9 May 2015 21:44:50 +0000 (18:44 -0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 1 Jun 2015 07:07:02 +0000 (09:07 +0200)
Simplify a trivial if-return sequence. Possibly combine with a
preceding function call.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/simple_return.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mxcmmc.c

index 317d709f75500fbc6aff6331ab48edb4d79f45b8..d110f9e98c4b45cc587378f740988acc2b3b3cfa 100644 (file)
@@ -605,11 +605,7 @@ static int mxcmci_push(struct mxcmci_host *host, void *_buf, int bytes)
                mxcmci_writel(host, cpu_to_le32(tmp), MMC_REG_BUFFER_ACCESS);
        }
 
-       stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY);
-       if (stat)
-               return stat;
-
-       return 0;
+       return mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY);
 }
 
 static int mxcmci_transfer_data(struct mxcmci_host *host)