diff mbox series

[v1,1/5] mmc: mmc_spi: Remove redundant dev_set_drvdata()

Message ID 20190327180110.32673-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [v1,1/5] mmc: mmc_spi: Remove redundant dev_set_drvdata() | expand

Commit Message

Andy Shevchenko March 27, 2019, 6:01 p.m. UTC
Driver core sets it to NULL upon probe failure or release.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mmc/host/mmc_spi.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Ulf Hansson March 28, 2019, 12:52 p.m. UTC | #1
On Wed, 27 Mar 2019 at 19:01, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Driver core sets it to NULL upon probe failure or release.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Series applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/mmc_spi.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
> index 1b1498805972..2e9d830da2c7 100644
> --- a/drivers/mmc/host/mmc_spi.c
> +++ b/drivers/mmc/host/mmc_spi.c
> @@ -1485,7 +1485,6 @@ static int mmc_spi_probe(struct spi_device *spi)
>  fail_nobuf1:
>         mmc_free_host(mmc);
>         mmc_spi_put_pdata(spi);
> -       dev_set_drvdata(&spi->dev, NULL);
>
>  nomem:
>         kfree(ones);
> @@ -1520,7 +1519,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);
> -               dev_set_drvdata(&spi->dev, NULL);
>         }
>         return 0;
>  }
> --
> 2.20.1
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index 1b1498805972..2e9d830da2c7 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -1485,7 +1485,6 @@  static int mmc_spi_probe(struct spi_device *spi)
 fail_nobuf1:
 	mmc_free_host(mmc);
 	mmc_spi_put_pdata(spi);
-	dev_set_drvdata(&spi->dev, NULL);
 
 nomem:
 	kfree(ones);
@@ -1520,7 +1519,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);
-		dev_set_drvdata(&spi->dev, NULL);
 	}
 	return 0;
 }