Commit 1c148853 authored by Yue Hu's avatar Yue Hu Committed by Ulf Hansson

mmc: core: remove needless err = 0 in mmc_init_card()

Since they will always being in successful path to return 0 directly,
no need to set err = 0.
Signed-off-by: default avatarYue Hu <huyue2@yulong.com>
Link: https://lore.kernel.org/r/20210113113431.522-1-zbestahu@gmail.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 754b7f2f
...@@ -1697,7 +1697,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, ...@@ -1697,7 +1697,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
goto free_card; goto free_card;
if (err) { if (err) {
err = 0;
/* /*
* Just disable enhanced area off & sz * Just disable enhanced area off & sz
* will try to enable ERASE_GROUP_DEF * will try to enable ERASE_GROUP_DEF
...@@ -1802,7 +1801,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, ...@@ -1802,7 +1801,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
pr_warn("%s: Enabling HPI failed\n", pr_warn("%s: Enabling HPI failed\n",
mmc_hostname(card->host)); mmc_hostname(card->host));
card->ext_csd.hpi_en = 0; card->ext_csd.hpi_en = 0;
err = 0;
} else { } else {
card->ext_csd.hpi_en = 1; card->ext_csd.hpi_en = 1;
} }
...@@ -1831,7 +1829,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, ...@@ -1831,7 +1829,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
pr_warn("%s: Cache is supported, but failed to turn on (%d)\n", pr_warn("%s: Cache is supported, but failed to turn on (%d)\n",
mmc_hostname(card->host), err); mmc_hostname(card->host), err);
card->ext_csd.cache_ctrl = 0; card->ext_csd.cache_ctrl = 0;
err = 0;
} else { } else {
card->ext_csd.cache_ctrl = 1; card->ext_csd.cache_ctrl = 1;
} }
...@@ -1851,7 +1848,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, ...@@ -1851,7 +1848,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
mmc_hostname(card->host)); mmc_hostname(card->host));
card->ext_csd.cmdq_support = false; card->ext_csd.cmdq_support = false;
card->ext_csd.cmdq_depth = 0; card->ext_csd.cmdq_depth = 0;
err = 0;
} }
} }
/* /*
......
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