From: Ulf Hansson Date: Mon, 10 Jun 2013 15:03:36 +0000 (+0200) Subject: mmc: core: Remove unnecessary check for the remove callback X-Git-Tag: firefly_0821_release~6165^2~63 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0bdc9d6ec058bc0b382a8ff07ea381a3ffc6e92e;p=firefly-linux-kernel-4.4.55.git mmc: core: Remove unnecessary check for the remove callback For every bus_ops type the .remove callback always exist, thus there are no need to check the existence of it, before we decide to call it. Signed-off-by: Ulf Hansson Tested-by: Jaehoon Chung Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index d01ec0829142..e182ad8a33ac 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2546,9 +2546,7 @@ void mmc_stop_host(struct mmc_host *host) mmc_bus_get(host); if (host->bus_ops && !host->bus_dead) { /* Calling bus_ops->remove() with a claimed host can deadlock */ - if (host->bus_ops->remove) - host->bus_ops->remove(host); - + host->bus_ops->remove(host); mmc_claim_host(host); mmc_detach_bus(host); mmc_power_off(host); @@ -2705,8 +2703,7 @@ int mmc_suspend_host(struct mmc_host *host) * bus_ops->remove() with a claimed host can * deadlock.) */ - if (host->bus_ops->remove) - host->bus_ops->remove(host); + host->bus_ops->remove(host); mmc_claim_host(host); mmc_detach_bus(host); mmc_power_off(host); @@ -2800,9 +2797,7 @@ int mmc_pm_notify(struct notifier_block *notify_block, break; /* Calling bus_ops->remove() with a claimed host can deadlock */ - if (host->bus_ops->remove) - host->bus_ops->remove(host); - + host->bus_ops->remove(host); mmc_claim_host(host); mmc_detach_bus(host); mmc_power_off(host);