Skip to content

Commit

Permalink
spi/atmel: fix simple_return.cocci warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fengguang Wu authored and Mark Brown committed Oct 20, 2014
1 parent ce0c4ca commit d0de6ff
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/spi/spi-atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1511,15 +1511,10 @@ static int atmel_spi_runtime_resume(struct device *dev)
{
struct spi_master *master = dev_get_drvdata(dev);
struct atmel_spi *as = spi_master_get_devdata(master);
int ret;

pinctrl_pm_select_default_state(dev);

ret = clk_prepare_enable(as->clk);
if (ret)
return ret;

return 0;
return clk_prepare_enable(as->clk);
}
#endif

Expand Down

0 comments on commit d0de6ff

Please sign in to comment.