diff mbox series

[v1,2/2] spi: pxa2xx: drv_data can't be NULL in ->remove()

Message ID 20200224154556.11627-2-andriy.shevchenko@linux.intel.com (mailing list archive)
State Mainlined
Commit 3d24b2a470466aa901ba8354468fc1899259fd84
Headers show
Series [v1,1/2] spi: pxa2xx: Return error codes from pxa2xx_spi_init_pdata() | expand

Commit Message

Andy Shevchenko Feb. 24, 2020, 3:45 p.m. UTC
There is no need for drv_data check against NULL, since it won't happen.
Remove useless check.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-pxa2xx.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index e33ef1169491..19d43c7ed1a0 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1889,11 +1889,7 @@  static int pxa2xx_spi_probe(struct platform_device *pdev)
 static int pxa2xx_spi_remove(struct platform_device *pdev)
 {
 	struct driver_data *drv_data = platform_get_drvdata(pdev);
-	struct ssp_device *ssp;
-
-	if (!drv_data)
-		return 0;
-	ssp = drv_data->ssp;
+	struct ssp_device *ssp = drv_data->ssp;
 
 	pm_runtime_get_sync(&pdev->dev);