linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 01/14] spi: pxa2xx: Use one point of return when ->probe() fails
@ 2021-04-23 16:34 Andy Shevchenko
  2021-04-23 16:34 ` [PATCH v1 02/14] spi: pxa2xx: Utilize MMIO and physical base from struct ssp_device Andy Shevchenko
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Andy Shevchenko @ 2021-04-23 16:34 UTC (permalink / raw)
  To: Andy Shevchenko, Mark Brown, Cezary Rojewski, linux-input,
	linux-kernel, linux-arm-kernel, linux-spi, alsa-devel
  Cc: Dmitry Torokhov, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Pierre-Louis Bossart, Liam Girdwood, Jie Yang, Jaroslav Kysela,
	Takashi Iwai

When we can't allocate SPI controller, jump to the error path rather than
return locally.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-pxa2xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 0cc767283674..0ef22045b006 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1701,8 +1701,8 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
 
 	if (!controller) {
 		dev_err(&pdev->dev, "cannot alloc spi_controller\n");
-		pxa_ssp_free(ssp);
-		return -ENOMEM;
+		status = -ENOMEM;
+		goto out_error_controller_alloc;
 	}
 	drv_data = spi_controller_get_devdata(controller);
 	drv_data->controller = controller;
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-04-23 17:51 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 16:34 [PATCH v1 01/14] spi: pxa2xx: Use one point of return when ->probe() fails Andy Shevchenko
2021-04-23 16:34 ` [PATCH v1 02/14] spi: pxa2xx: Utilize MMIO and physical base from struct ssp_device Andy Shevchenko
2021-04-23 16:34 ` [PATCH v1 03/14] spi: pxa2xx: Utilize struct device " Andy Shevchenko
2021-04-23 16:34 ` [PATCH v1 04/14] spi: pxa2xx: Replace header inclusions by forward declarations Andy Shevchenko
2021-04-23 16:34 ` [PATCH v1 05/14] spi: pxa2xx: Consolidate related headers under include/linux/spi Andy Shevchenko
2021-04-23 16:56   ` Mark Brown
2021-04-23 17:30     ` Andy Shevchenko
2021-04-23 17:49       ` Mark Brown
2021-04-23 16:34 ` [PATCH v1 06/14] spi: pxa2xx: Group Intel Quark specific definitions Andy Shevchenko
2021-04-23 16:34 ` [PATCH v1 07/14] spi: pxa2xx: Introduce int_stop_and_reset() helper Andy Shevchenko
2021-04-23 16:34 ` [PATCH v1 08/14] spi: pxa2xx: Reuse int_error_stop() in pxa2xx_spi_slave_abort() Andy Shevchenko
2021-04-23 16:34 ` [PATCH v1 09/14] spi: pxa2xx: Use pxa_ssp_enable()/pxa_ssp_disable() in the driver Andy Shevchenko
2021-04-23 16:34 ` [PATCH v1 10/14] spi: pxa2xx: Extract pxa2xx_spi_update() helper Andy Shevchenko
2021-04-23 16:34 ` [PATCH v1 11/14] spi: pxa2xx: Extract clear_SSCR1_bits() helper Andy Shevchenko
2021-04-23 16:34 ` [PATCH v1 12/14] spi: pxa2xx: Extract read_SSSR_bits() helper Andy Shevchenko
2021-04-23 16:34 ` [PATCH v1 13/14] spi: pxa2xx: Constify struct driver_data parameter Andy Shevchenko
2021-04-23 16:34 ` [PATCH v1 14/14] spi: pxa2xx: Introduce special type for Merrifield SPIs Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).