lkml.org 
[lkml]   [2015]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] mfd: intel_soc_pmic: Do not mangle error code from devm_gpiod_get_index()
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 <jarkko.nikula@linux.intel.com>
> ---
> 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


\
 
 \ /
  Last update: 2015-02-16 13:21    [W:3.925 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site