From d0de6ff6b92665c10a93795e9d041a61f64431af Mon Sep 17 00:00:00 2001 From: Fengguang Wu Date: Fri, 17 Oct 2014 00:18:56 +0800 Subject: 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 Signed-off-by: Mark Brown --- drivers/spi/spi-atmel.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers/spi/spi-atmel.c') 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) { 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 -- cgit v1.2.3