Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58a8a4a1 authored by Ulf Hansson's avatar Ulf Hansson Committed by Chris Ball
Browse files

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: default avatarUlf Hansson <ulf.hansson@linaro.org>
Tested-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 017d84bd
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -2483,9 +2483,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);

		mmc_claim_host(host);
		mmc_detach_bus(host);
		mmc_power_off(host);
@@ -2638,7 +2636,6 @@ 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);
			mmc_claim_host(host);
			mmc_detach_bus(host);
@@ -2722,9 +2719,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);

		mmc_claim_host(host);
		mmc_detach_bus(host);
		mmc_power_off(host);