diff mbox series

[v1,03/11] spi: pxa2xx-pci: Drop redundant NULL check in ->probe()

Message ID 20220225172350.69797-3-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Commit 1d9d62959f1b52eb939df38b9fda8beea455c751
Headers show
Series [v1,01/11] spi: pxa2xx-pci: Refactor CE4100 to use ->setup() | expand

Commit Message

Andy Shevchenko Feb. 25, 2022, 5:23 p.m. UTC
Since all platforms are using ->setup() function, drop unneeded check.

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

Patch

diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c
index 4d617ad72bca..90b95e49a164 100644
--- a/drivers/spi/spi-pxa2xx-pci.c
+++ b/drivers/spi/spi-pxa2xx-pci.c
@@ -255,11 +255,9 @@  static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
 		return ret;
 
 	c = &spi_info_configs[ent->driver_data];
-	if (c->setup) {
-		ret = c->setup(dev, c);
-		if (ret)
-			return ret;
-	}
+	ret = c->setup(dev, c);
+	if (ret)
+		return ret;
 
 	memset(&spi_pdata, 0, sizeof(spi_pdata));
 	spi_pdata.num_chipselect = c->num_chipselect;