Commit 70a557e6 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Ulf Hansson
Browse files

mmc: mmc_spi: Remove useless NULL check at ->remove()



The mmc pointer can't be NULL at ->remove(), drop the useless check.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent b9ffe408
Loading
Loading
Loading
Loading
+16 −20
Original line number Diff line number Diff line
@@ -1499,10 +1499,7 @@ nomem:
static int mmc_spi_remove(struct spi_device *spi)
{
	struct mmc_host		*mmc = dev_get_drvdata(&spi->dev);
	struct mmc_spi_host	*host;

	if (mmc) {
		host = mmc_priv(mmc);
	struct mmc_spi_host	*host = mmc_priv(mmc);

	/* prevent new mmc_detect_change() calls */
	if (host->pdata && host->pdata->exit)
@@ -1523,7 +1520,6 @@ static int mmc_spi_remove(struct spi_device *spi)
	spi->max_speed_hz = mmc->f_max;
	mmc_free_host(mmc);
	mmc_spi_put_pdata(spi);
	}
	return 0;
}