summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2019-02-01 11:17:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-05 22:34:43 +0200
commit9bd4debdd54474e3147b40675c705a88ff9a976b (patch)
tree9cbc24e0d7af2913a9f63b44322b37034686c195 /drivers/staging
parent3aa0518aacaa545e4778e7efb160c70d34984a3a (diff)
downloadblackbird-obmc-linux-9bd4debdd54474e3147b40675c705a88ff9a976b.tar.gz
blackbird-obmc-linux-9bd4debdd54474e3147b40675c705a88ff9a976b.zip
staging: spi: mt7621: Add return code check on device_reset()
[ Upstream commit 46c337872f34bc6387b0c29a4964f562c70139e3 ] This patch adds a return code check on device_reset() and removes the compile warning. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Mark Brown <broonie@kernel.org> Cc: Sankalp Negi <sankalpnegi2310@gmail.com> Cc: Chuanhong Guo <gch981213@gmail.com> Cc: John Crispin <john@phrozen.org> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/mt7621-spi/spi-mt7621.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c b/drivers/staging/mt7621-spi/spi-mt7621.c
index 513b6e79b985..e1f50efd0922 100644
--- a/drivers/staging/mt7621-spi/spi-mt7621.c
+++ b/drivers/staging/mt7621-spi/spi-mt7621.c
@@ -330,6 +330,7 @@ static int mt7621_spi_probe(struct platform_device *pdev)
int status = 0;
struct clk *clk;
struct mt7621_spi_ops *ops;
+ int ret;
match = of_match_device(mt7621_spi_match, &pdev->dev);
if (!match)
@@ -377,7 +378,11 @@ static int mt7621_spi_probe(struct platform_device *pdev)
rs->pending_write = 0;
dev_info(&pdev->dev, "sys_freq: %u\n", rs->sys_freq);
- device_reset(&pdev->dev);
+ ret = device_reset(&pdev->dev);
+ if (ret) {
+ dev_err(&pdev->dev, "SPI reset failed!\n");
+ return ret;
+ }
mt7621_spi_reset(rs);
OpenPOWER on IntegriCloud