Variable assignment just before return is redundant.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
static int _mmc_select_card(struct mmc_host *host, struct mmc_card *card)
{
static int _mmc_select_card(struct mmc_host *host, struct mmc_card *card)
{
struct mmc_command cmd = {0};
BUG_ON(!host);
struct mmc_command cmd = {0};
BUG_ON(!host);
cmd.flags = MMC_RSP_NONE | MMC_CMD_AC;
}
cmd.flags = MMC_RSP_NONE | MMC_CMD_AC;
}
- err = mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
- if (err)
- return err;
-
- return 0;
+ return mmc_wait_for_cmd(host, &cmd, MMC_CMD_RETRIES);
}
int mmc_select_card(struct mmc_card *card)
}
int mmc_select_card(struct mmc_card *card)
int mmc_set_relative_addr(struct mmc_card *card)
{
int mmc_set_relative_addr(struct mmc_card *card)
{
struct mmc_command cmd = {0};
BUG_ON(!card);
struct mmc_command cmd = {0};
BUG_ON(!card);
cmd.arg = card->rca << 16;
cmd.flags = MMC_RSP_R1 | MMC_CMD_AC;
cmd.arg = card->rca << 16;
cmd.flags = MMC_RSP_R1 | MMC_CMD_AC;
- err = mmc_wait_for_cmd(card->host, &cmd, MMC_CMD_RETRIES);
- if (err)
- return err;
-
- return 0;
+ return mmc_wait_for_cmd(card->host, &cmd, MMC_CMD_RETRIES);
int mmc_bus_test(struct mmc_card *card, u8 bus_width)
{
int mmc_bus_test(struct mmc_card *card, u8 bus_width)
{
if (bus_width == MMC_BUS_WIDTH_8)
width = 8;
if (bus_width == MMC_BUS_WIDTH_8)
width = 8;
* is a problem. This improves chances that the test will work.
*/
mmc_send_bus_test(card, card->host, MMC_BUS_TEST_W, width);
* is a problem. This improves chances that the test will work.
*/
mmc_send_bus_test(card, card->host, MMC_BUS_TEST_W, width);
- err = mmc_send_bus_test(card, card->host, MMC_BUS_TEST_R, width);
- return err;
+ return mmc_send_bus_test(card, card->host, MMC_BUS_TEST_R, width);
}
int mmc_send_hpi_cmd(struct mmc_card *card, u32 *status)
}
int mmc_send_hpi_cmd(struct mmc_card *card, u32 *status)
int mmc_app_set_bus_width(struct mmc_card *card, int width)
{
int mmc_app_set_bus_width(struct mmc_card *card, int width)
{
struct mmc_command cmd = {0};
BUG_ON(!card);
struct mmc_command cmd = {0};
BUG_ON(!card);
- err = mmc_wait_for_app_cmd(card->host, card, &cmd, MMC_CMD_RETRIES);
- if (err)
- return err;
-
- return 0;
+ return mmc_wait_for_app_cmd(card->host, card, &cmd, MMC_CMD_RETRIES);
}
int mmc_send_app_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr)
}
int mmc_send_app_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr)
- ret = mmc_io_rw_direct_host(host, 1, 0, SDIO_CCCR_ABORT, abort, NULL);
- return ret;
+ return mmc_io_rw_direct_host(host, 1, 0, SDIO_CCCR_ABORT, abort, NULL);