spi: pxa2xx: Remove duplicate check
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 30 May 2024 15:10:03 +0000 (18:10 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 3 Jun 2024 15:00:00 +0000 (16:00 +0100)
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>
Link: https://msgid.link/r/20240530151117.1130792-8-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx.c

index 30a829b74a22c7c3b7214e7287fda2f4e47cb77e..9724d94558372743c0035be65fe0a8274db3665e 100644 (file)
@@ -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