Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932402AbbBPLtq (ORCPT ); Mon, 16 Feb 2015 06:49:46 -0500 Received: from mail-wg0-f51.google.com ([74.125.82.51]:44843 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755255AbbBPLto (ORCPT ); Mon, 16 Feb 2015 06:49:44 -0500 Date: Mon, 16 Feb 2015 11:49:39 +0000 From: Lee Jones To: Jarkko Nikula Cc: linux-kernel@vger.kernel.org, Samuel Ortiz , lejun.zhu@linux.intel.com, bin.yang@intel.com Subject: Re: [PATCH 2/3] mfd: intel_soc_pmic: Do not mangle error code from devm_gpiod_get_index() Message-ID: <20150216114939.GC2037@x1> References: <1423832475-5803-1-git-send-email-jarkko.nikula@linux.intel.com> <1423832475-5803-2-git-send-email-jarkko.nikula@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1423832475-5803-2-git-send-email-jarkko.nikula@linux.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1284 Lines: 38 On Fri, 13 Feb 2015, Jarkko Nikula wrote: > It is usually better to pass actual error code from a function call than > mangling it to another. > > Signed-off-by: Jarkko Nikula > --- > I haven't seen any issue with this. Random observation by looking at the code. > --- > drivers/mfd/intel_soc_pmic_core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. > diff --git a/drivers/mfd/intel_soc_pmic_core.c b/drivers/mfd/intel_soc_pmic_core.c > index 08c8e3dafaf5..40488e5b52ef 100644 > --- a/drivers/mfd/intel_soc_pmic_core.c > +++ b/drivers/mfd/intel_soc_pmic_core.c > @@ -33,7 +33,7 @@ static int intel_soc_pmic_find_gpio_irq(struct device *dev) > > desc = devm_gpiod_get_index(dev, "intel_soc_pmic", 0); > if (IS_ERR(desc)) > - return -ENOENT; > + return PTR_ERR(desc); > > irq = gpiod_to_irq(desc); > if (irq < 0) -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- 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/