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: 160946 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp994070jan; Fri, 22 Mar 2019 09:18:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwefVZXg0+hg8hBdG6iy0SKjwsgdUA7xmzz3suXlQ3XjKgL0L51q89TMvts2lt+8EvFKMHX X-Received: by 2002:a17:902:e701:: with SMTP id co1mr10458921plb.61.1553271506444; Fri, 22 Mar 2019 09:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553271506; cv=none; d=google.com; s=arc-20160816; b=NfrCRgVcmqJPeGgJDxo5SnXoOGIr0IfD9B5FuiOiRYpWC6XC3AyGbybO0zp8cHZxhs 7OY740NvqqxYldfsNmsvfLseow8CqfosEuZQruoqmW0A3WFbg2ewIaV/8FF22js8ovDH Is0/7r97tKaq7l/uvQZBEOKuv8glkhEC/OjwaiYSzQxkEBkolnZfqi728K691h1srvgF 08c2708ssdnD3bh+pdLh1HBL8C3Ix1IGH/PZdvTr+PVDXArjz1cddYh7ySrkzKyJjC/u 927/RQ4zJjH43wPA1qp6C3pQKS1ADuCF0P4qcoz2001JEgoDR/0UuTdU6AvuzaDFdxHl YV/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=CEBag7n4/GBhYZndOFcYfJc1DpsldGkSGorW5uZtoqY=; b=yg0MeqSYeykBy/PETwDq16GTiesK4Cu+YDuzchPHnosTtHONq/uI9TczCmK2pJZT/5 tYMR9UBzxTnXTQzgfihdkrxDK/AwI+G7px/kmHTXhYaQlytxMrLLo42iYbvCoAeYmjKz WBdKSIiZz1Lq1bFUslatknLqjt2LIAEzXfc0EXp1vO/MbxwKiCAK36jfqGD0VFEQvpi+ AHbvlbIdDLf6rj556KOQM03o+Q1sOCUVJ6rvuzubCQ5RuPd+DywiTMCncFpMF5dA3Ong OUzdLeKlg5RVrhlebw6rqccAQVdek6BlyTALLsELJPwuMQDydm33ukwxz5Z+z8g9AZu9 QycA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h21si6992593pgl.346.2019.03.22.09.18.25; Fri, 22 Mar 2019 09:18:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729622AbfCVQSU (ORCPT + 31 others); Fri, 22 Mar 2019 12:18:20 -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-Spam-Flag: NO 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.20.0 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);