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: <20190322161727.1153278-9-arnd@arndb.de>
Date:   Fri, 22 Mar 2019 17:17:23 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     stable@...r.kernel.org, Sebastian Reichel <sre@...nel.org>
Cc:     Baolin Wang <baolin.wang@...aro.org>,
        Sebastian Reichel <sebastian.reichel@...labora.com>,
        Arnd Bergmann <arnd@...db.de>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [BACKPORT 4.14.y 8/8] power: supply: charger-manager: Fix incorrect return value

From: Baolin Wang <baolin.wang@...aro.org>

Fix incorrect return value.

Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.com>
(cherry picked from commit f25a646fbe2051527ad9721853e892d13a99199e)
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/power/supply/charger-manager.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index 6502fa7c2106..f60dfc213257 100644
--- a/drivers/power/supply/charger-manager.c
+++ b/drivers/power/supply/charger-manager.c
@@ -1212,7 +1212,6 @@ static int charger_extcon_init(struct charger_manager *cm,
 	if (ret < 0) {
 		pr_info("Cannot register extcon_dev for %s(cable: %s)\n",
 			cable->extcon_name, cable->name);
-		ret = -EINVAL;
 	}
 
 	return ret;
@@ -1629,7 +1628,7 @@ static int charger_manager_probe(struct platform_device *pdev)
 
 	if (IS_ERR(desc)) {
 		dev_err(&pdev->dev, "No platform data (desc) found\n");
-		return -ENODEV;
+		return PTR_ERR(desc);
 	}
 
 	cm = devm_kzalloc(&pdev->dev, sizeof(*cm), GFP_KERNEL);
-- 
2.20.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ