Commit 982c34e0 authored by Bhanusree Pola's avatar Bhanusree Pola Committed by Greg Kroah-Hartman

staging: mt7621-mmc: Fix ret.cooci warnings

Return the value directly instead of storing it in local variable err.
Remove the unused local variable err.
The semantic patch that fixes the first part of the problem is as follows

// <smpl>
@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;
// </smpl>
Signed-off-by: default avatarBhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b1c30bd6
...@@ -752,7 +752,6 @@ static int msdc_app_cmd(struct mmc_host *mmc, struct msdc_host *host) ...@@ -752,7 +752,6 @@ static int msdc_app_cmd(struct mmc_host *mmc, struct msdc_host *host)
{ {
struct mmc_command cmd; struct mmc_command cmd;
struct mmc_request mrq; struct mmc_request mrq;
u32 err;
memset(&cmd, 0, sizeof(struct mmc_command)); memset(&cmd, 0, sizeof(struct mmc_command));
cmd.opcode = MMC_APP_CMD; cmd.opcode = MMC_APP_CMD;
...@@ -763,8 +762,7 @@ static int msdc_app_cmd(struct mmc_host *mmc, struct msdc_host *host) ...@@ -763,8 +762,7 @@ static int msdc_app_cmd(struct mmc_host *mmc, struct msdc_host *host)
mrq.cmd = &cmd; cmd.mrq = &mrq; mrq.cmd = &cmd; cmd.mrq = &mrq;
cmd.data = NULL; cmd.data = NULL;
err = msdc_do_command(host, &cmd, 0, CMD_TIMEOUT); return msdc_do_command(host, &cmd, 0, CMD_TIMEOUT);
return err;
} }
static int msdc_tune_cmdrsp(struct msdc_host *host, struct mmc_command *cmd) static int msdc_tune_cmdrsp(struct msdc_host *host, struct mmc_command *cmd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment