[PATCH 2/5] spi: amd: Pass probe errors back to driver core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If probing fails, the AMD SPI driver pretends success to the driver core
by returning 0.  Return the errno instead.

Signed-off-by: Lukas Wunner <lukas@xxxxxxxxx>
---
 drivers/spi/spi-amd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c
index 65b53eee5be9..a4248b97b67e 100644
--- a/drivers/spi/spi-amd.c
+++ b/drivers/spi/spi-amd.c
@@ -294,7 +294,7 @@ static int amd_spi_probe(struct platform_device *pdev)
 err_free_master:
 	spi_master_put(master);
 
-	return 0;
+	return err;
 }
 
 static int amd_spi_remove(struct platform_device *pdev)
-- 
2.26.2




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux