From patchwork Fri Mar 22 16:17:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10866201 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C37E61515 for ; Fri, 22 Mar 2019 16:18:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A98392A914 for ; Fri, 22 Mar 2019 16:18:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9DC912A91C; Fri, 22 Mar 2019 16:18:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41032294BD for ; Fri, 22 Mar 2019 16:18:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729589AbfCVQSS (ORCPT ); Fri, 22 Mar 2019 12:18:18 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:55441 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727898AbfCVQSR (ORCPT ); Fri, 22 Mar 2019 12:18:17 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MGz9p-1hC5qR2OBv-00E4Nl; Fri, 22 Mar 2019 17:18:12 +0100 From: Arnd Bergmann To: stable@vger.kernel.org, Sebastian Reichel Cc: Baolin Wang , Sebastian Reichel , Arnd Bergmann , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [BACKPORT 4.14.y 8/8] power: supply: charger-manager: Fix incorrect return value Date: Fri, 22 Mar 2019 17:17:23 +0100 Message-Id: <20190322161727.1153278-9-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190322161727.1153278-1-arnd@arndb.de> References: <20190322161727.1153278-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:6ScF2cDbBBtmdzkHdRlSrHcxdLZn0+JBp7AxazAA+HUIu4cU7BF O6YY5JWQPNLaP27RU+gIXmAhUSQBpbwKHBtDu3q7eyqppgM9upVOG+je0fogwPvrvkhPrrH yYw3wfTIoAIREC88a6DD8sYR5DvxGLFOzGmMmDXUvBb6OpnCQN3dN68veWv4A7rGcNd9xG5 R/birbHdbDrlg/ZhDHCSQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:BYxt3WBL1qs=:G8aBjDBAzJ9p+b57cHYdFl R70dmBuroo7xpL7qA7YWV9ve5VBE3NOoiRhGcdAg5roJULVzNtkwsCn9AqZc8qpg/stivFZAf HUXTjAkkMWGNFQ9qLa0JFIAUcqjYQenqaEuwvEfQyw3HFbEgAc7PhydSobEdZakCKZ5OX4PAi DoMRYvzDWaHUHc6d0F2tnRWWXSIpThiq6I5ztyLNSRtbAtuSZNBaFGOXDuMgegxReu3tTp4Us aqRFbdsi4DrL9eMPy5hBzOZZzdh5ve/D0+Tc2pJ1UkRufwGFaVyQEDjNxtTJvBlka2GrKZrSF SFOJ5rK5bmCUhQv3BrBYFo0jKJckW6lRbcwA25uYkVwnxVOy1dQ9HIvwJQe4fP0RjpSgmM5ka p/iLHCFYS0TahHNTo9WdY4fidqJaq8hwrIRV3RJ+Fl+KYsD6xXTS1UJcvl0MY4Kd+z6BqxTyN 1b01Po0oDvDG2gIUhtdidWpUlpVBPRkKUMTWeeRr5v80PgeSXWIeITeDD7F9O9QqCs14/fISW j5v5U0Buc6dAKiIYep61lMu5rRbSlQTvjls4LKHc3okTa4J6p7CDqDe1UJaEoMTk0UP35pjnB DZip7WXsVgewXatRUrtnTFElSmLXOylQiewH4CmJwb2BV/B72aAB3zKhLWH0tzlR9231sru4O jCGRq5nnqps08UQcQ6tBQtcYHK+u244RfWTkDiYDzaPt2lEKcoyKSVqOikIL47cc56utdAg0m ePh6i5X1cSPFz+GcaHD9UPaP2Iv1LTYvbdBIaQ== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Baolin Wang Fix incorrect return value. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel (cherry picked from commit f25a646fbe2051527ad9721853e892d13a99199e) Signed-off-by: Arnd Bergmann --- 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);