]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
greybus: sdio: some cleanups in command function
authorRui Miguel Silva <rui.silva@linaro.org>
Thu, 15 Oct 2015 22:56:52 +0000 (23:56 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 19 Oct 2015 19:06:44 +0000 (12:06 -0700)
Some cleanups in gb_sdio_command function, ret does not need to be
initialize and mrq is already pointing to request, no need to get it
from host.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/sdio.c

index 201cfe5344591b4d228d7dace3bb2c0130e75073..beb35747a4f872ddcdf894140601b873212f2605 100644 (file)
@@ -379,7 +379,7 @@ static int gb_sdio_command(struct gb_sdio_host *host, struct mmc_command *cmd)
        u8 cmd_flags;
        u8 cmd_type;
        int i;
-       int ret = 0;
+       int ret;
 
        switch (mmc_resp_type(cmd)) {
        case MMC_RSP_NONE:
@@ -488,7 +488,7 @@ static void gb_sdio_mrq_work(struct work_struct *work)
                goto done;
 
        if (mrq->data) {
-               ret = gb_sdio_transfer(host, host->mrq->data);
+               ret = gb_sdio_transfer(host, mrq->data);
                if (ret < 0)
                        goto done;
        }