Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1584136

[PATCH] spi: spi-fsl-dspi: Fix error handling

From Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Newsgroups linux.kernel
Subject [PATCH] spi: spi-fsl-dspi: Fix error handling
Date 2017-02-19 14:30 +0100
Message-ID <tczIS-7Tc-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


According to error handling in this function, it is likely that going to
'out_master_put' was expected here.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/spi/spi-fsl-dspi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 14c8e7ce1913..15201645bdc4 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -1002,7 +1002,8 @@ static int dspi_probe(struct platform_device *pdev)
 	if (IS_ERR(dspi->regmap)) {
 		dev_err(&pdev->dev, "failed to init regmap: %ld\n",
 				PTR_ERR(dspi->regmap));
-		return PTR_ERR(dspi->regmap);
+		ret = PTR_ERR(dspi->regmap);
+		goto out_master_put;
 	}
 
 	dspi_init(dspi);
-- 
2.9.3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] spi: spi-fsl-dspi: Fix error handling Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-02-19 14:30 +0100
  Applied "spi: spi-fsl-dspi: Fix error handling" to the spi tree Mark Brown <broonie@kernel.org> - 2017-02-21 19:00 +0100

csiph-web