lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1423832475-5803-2-git-send-email-jarkko.nikula@linux.intel.com>
Date:	Fri, 13 Feb 2015 15:01:14 +0200
From:	Jarkko Nikula <jarkko.nikula@...ux.intel.com>
To:	linux-kernel@...r.kernel.org
Cc:	Samuel Ortiz <sameo@...ux.intel.com>,
	Lee Jones <lee.jones@...aro.org>, <lejun.zhu@...ux.intel.com>,
	<bin.yang@...el.com>, Jarkko Nikula <jarkko.nikula@...ux.intel.com>
Subject: [PATCH 2/3] mfd: intel_soc_pmic: Do not mangle error code from devm_gpiod_get_index()

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@...ux.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(-)

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)
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ