Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751957AbaJQJFy (ORCPT ); Fri, 17 Oct 2014 05:05:54 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:35851 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750807AbaJQJFw (ORCPT ); Fri, 17 Oct 2014 05:05:52 -0400 Message-ID: <5440DBE8.90207@atmel.com> Date: Fri, 17 Oct 2014 11:05:44 +0200 From: Nicolas Ferre Organization: atmel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Fengguang Wu , Mark Brown CC: , , , Wenyou Yang Subject: Re: [PATCH] spi/atmel: fix simple_return.cocci warnings References: <543feff0.QhS1UtLsJt/o5948%fengguang.wu@intel.com> In-Reply-To: <543feff0.QhS1UtLsJt/o5948%fengguang.wu@intel.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.161.30.18] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/10/2014 18:18, Fengguang Wu : > 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 > > CC: Wenyou Yang > Signed-off-by: Fengguang Wu > --- > > Please take the patch only if it's a positive warning. Thanks! > > spi-atmel.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > --- a/drivers/spi/spi-atmel.c > +++ b/drivers/spi/spi-atmel.c > @@ -1511,15 +1511,10 @@ static int atmel_spi_runtime_resume(stru > { > 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); Indeed: Acked-by: Nicolas Ferre > } > #endif > > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Nicolas Ferre -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/