diff mbox series

[v2,07/11] spi: pxa2xx: Remove duplicate check

Message ID 20240530151117.1130792-8-andriy.shevchenko@linux.intel.com
State Accepted
Commit 560fb06df2fd250004a1cac079717dbe7f863ff2
Headers show
Series spi: pxa2xx: Get rid of an additional layer in PCI driver | expand

Commit Message

Andy Shevchenko May 30, 2024, 3:10 p.m. UTC
The mmio_base can't be NULL at this point. It's either checked
in both pxa_ssp_probe() and pxa2xx_spi_init_ssp() or correctly
provided by PCI core. Hence, remove duplicate check which is
a dead code.

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

Patch

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 30a829b74a22..9724d9455837 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1441,9 +1441,6 @@  static int pxa2xx_spi_probe(struct platform_device *pdev)
 	if (!ssp)
 		ssp = &platform_info->ssp;
 
-	if (!ssp->mmio_base)
-		return dev_err_probe(dev, -ENODEV, "failed to get SSP\n");
-
 	if (platform_info->is_target)
 		controller = devm_spi_alloc_target(dev, sizeof(*drv_data));
 	else