diff options
author | Fengguang Wu <fengguang.wu@intel.com> | 2014-10-16 12:18:56 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-20 07:24:18 -0400 |
commit | d0de6ff6b92665c10a93795e9d041a61f64431af (patch) | |
tree | 1d93e85fbe2044ae7d9095911cdfb51f666a640c | |
parent | ce0c4caf256cb828e0465d3cd363ec145e446e21 (diff) |
spi/atmel: fix simple_return.cocci warnings
drivers/spi/spi-atmel.c:1518:1-4: WARNING: end returns can be simpified and declaration on line 1514 can be dropped
Simplify a trivial if-return sequence. Possibly combine with a
preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-atmel.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index bc9d96902837..3f500142f13c 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c | |||
@@ -1511,15 +1511,10 @@ static int atmel_spi_runtime_resume(struct device *dev) | |||
1511 | { | 1511 | { |
1512 | struct spi_master *master = dev_get_drvdata(dev); | 1512 | struct spi_master *master = dev_get_drvdata(dev); |
1513 | struct atmel_spi *as = spi_master_get_devdata(master); | 1513 | struct atmel_spi *as = spi_master_get_devdata(master); |
1514 | int ret; | ||
1515 | 1514 | ||
1516 | pinctrl_pm_select_default_state(dev); | 1515 | pinctrl_pm_select_default_state(dev); |
1517 | 1516 | ||
1518 | ret = clk_prepare_enable(as->clk); | 1517 | return clk_prepare_enable(as->clk); |
1519 | if (ret) | ||
1520 | return ret; | ||
1521 | |||
1522 | return 0; | ||
1523 | } | 1518 | } |
1524 | #endif | 1519 | #endif |
1525 | 1520 | ||