Commit 46c33787 authored by Stefan Roese's avatar Stefan Roese Committed by Greg Kroah-Hartman

staging: spi: mt7621: Add return code check on device_reset()

This patch adds a return code check on device_reset() and removes the
compile warning.
Signed-off-by: default avatarStefan 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: default avatarNeilBrown <neil@brown.name>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dab7ed43
...@@ -321,6 +321,7 @@ static int mt7621_spi_probe(struct platform_device *pdev) ...@@ -321,6 +321,7 @@ static int mt7621_spi_probe(struct platform_device *pdev)
int status = 0; int status = 0;
struct clk *clk; struct clk *clk;
struct mt7621_spi_ops *ops; struct mt7621_spi_ops *ops;
int ret;
match = of_match_device(mt7621_spi_match, &pdev->dev); match = of_match_device(mt7621_spi_match, &pdev->dev);
if (!match) if (!match)
...@@ -368,7 +369,11 @@ static int mt7621_spi_probe(struct platform_device *pdev) ...@@ -368,7 +369,11 @@ static int mt7621_spi_probe(struct platform_device *pdev)
rs->pending_write = 0; rs->pending_write = 0;
dev_info(&pdev->dev, "sys_freq: %u\n", rs->sys_freq); 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); mt7621_spi_reset(rs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment