projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ccef844
)
spi: pxa2xx: Use one point of return when ->probe() fails
author
Andy Shevchenko
<andriy.shevchenko@linux.intel.com>
Fri, 23 Apr 2021 18:24:28 +0000
(21:24 +0300)
committer
Mark Brown
<broonie@kernel.org>
Mon, 10 May 2021 12:17:09 +0000
(13:17 +0100)
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>
Link:
https://lore.kernel.org/r/20210423182441.50272-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx.c
patch
|
blob
|
history
diff --git
a/drivers/spi/spi-pxa2xx.c
b/drivers/spi/spi-pxa2xx.c
index 5e59ba075bc7aefd582987bd88d7f233d3bf1c1f..2f5618883ac3c9e7d78ddd6bc170c2a68337b2f6 100644
(file)
--- a/
drivers/spi/spi-pxa2xx.c
+++ b/
drivers/spi/spi-pxa2xx.c
@@
-1705,8
+1705,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;