summaryrefslogtreecommitdiff
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorYue Hu <huyue2@yulong.com>2021-01-15 11:45:06 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2021-02-01 11:54:46 +0100
commit783667ccb5b57cc81af2646b46f56ada05f0f0ae (patch)
treea0ff5f7182795f7368c712083ac0d4a119166835 /drivers/mmc/core
parent1c148853e8eb433ec88cf0b9482376ec7814b599 (diff)
mmc: core: remove redundant card null check to mmc_can_sleep()
Note that only _mmc_suspend() will call mmc_can_sleep(). And card is checked before in mmc_can_poweroff_notify(). Signed-off-by: Yue Hu <huyue2@yulong.com> Link: https://lore.kernel.org/r/20210115034506.646-1-zbestahu@gmail.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r--drivers/mmc/core/mmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 54ab1c7405e5..0d80b72ddde8 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1895,7 +1895,7 @@ err:
static int mmc_can_sleep(struct mmc_card *card)
{
- return (card && card->ext_csd.rev >= 3);
+ return card->ext_csd.rev >= 3;
}
static int mmc_sleep(struct mmc_host *host)