From patchwork Fri Nov 16 11:01:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10685913 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 5AB5E1747 for ; Fri, 16 Nov 2018 11:02:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 481332D0D5 for ; Fri, 16 Nov 2018 11:02:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 399482D110; Fri, 16 Nov 2018 11:02:29 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 E5C6A2D128 for ; Fri, 16 Nov 2018 11:02:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389532AbeKPVN5 (ORCPT ); Fri, 16 Nov 2018 16:13:57 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46044 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389514AbeKPVN4 (ORCPT ); Fri, 16 Nov 2018 16:13:56 -0500 Received: by mail-pg1-f193.google.com with SMTP id y4so10458171pgc.12 for ; Fri, 16 Nov 2018 03:02:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=1sCzjJpuyoWAr3SZdjEjaCQC9rkWcsgGFIVrSihaM1o=; b=EYSmG4fP+EBCLFpS0lesxnIuPLkCQaeDlr7V1pYlMXk9ZJBIW6Vkje/8uYps6+lbyX k/mvNHYnGrCviwD9IprEAwK3uYLY396LT9HIg/iEQbrgImLIfY+LZ0SODLR+dIkU7irv fmG0dV/IoMH3mgYZyk3Rwwn0PRWWShlCl8CkM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=1sCzjJpuyoWAr3SZdjEjaCQC9rkWcsgGFIVrSihaM1o=; b=R7A2Frf9VJ78OjhjbnygqkBIbT5WE+TyjuurJ4hQTK/qAGfToMe6vWlyR9mOIktr+d dJpcL3weEWdwpR8ePEQ0YUlObEv6rTvXD4PIgSLb8fsyg34YKdAIea2PPTBSBtWgqboK V4ULEVrnr8pUKwstOeBvfbyLwFv8ggPQcFu1/dFJX2G92H7UHaxPXZ+2Mx3gK3Ah67LG uwqKBp5+o0J9ZeYDnQysOzvTB5T7VZmxBVrcxey0nNlufEVGAaUrQibMPzk9+h+8oMsp snCw2HeJZOZdW9TMsJfDU05/LhxI23pqMmqojVdEr+c9+tjVjSYRRmW7Yil6/vRlRpJ+ bwPg== X-Gm-Message-State: AGRZ1gL2i290v4Z/JyhuwM/g2+gBJMGnDap/uU2IEBmOsTwdoIed9VIg VPd9AHUPvRwL7rJ1cuwva4fTGw== X-Google-Smtp-Source: AJdET5d9M+WFrHcPuCILaiINB7Uq4f1JDAtltUBrI+KqnwdRk33BFpgTjc5xh9Dtxw1yPwXuBjcbhA== X-Received: by 2002:a63:3546:: with SMTP id c67mr9619376pga.284.1542366125739; Fri, 16 Nov 2018 03:02:05 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id 202sm21268106pfy.87.2018.11.16.03.02.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Nov 2018 03:02:05 -0800 (PST) From: Baolin Wang To: sre@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, yuanjiang.yu@unisoc.com, baolin.wang@linaro.org, broonie@kernel.org, linus.walleij@linaro.org Subject: [PATCH 3/6] power: supply: charger-manager: Fix incorrect return value Date: Fri, 16 Nov 2018 19:01:10 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <4ea9eaf85d780afb190cb45da2df8ff5fd86d449.1542362262.git.baolin.wang@linaro.org> References: <4ea9eaf85d780afb190cb45da2df8ff5fd86d449.1542362262.git.baolin.wang@linaro.org> In-Reply-To: <4ea9eaf85d780afb190cb45da2df8ff5fd86d449.1542362262.git.baolin.wang@linaro.org> References: <4ea9eaf85d780afb190cb45da2df8ff5fd86d449.1542362262.git.baolin.wang@linaro.org> 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 Fix incorrect return value. Signed-off-by: Baolin Wang --- 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 bd6c450..a52bc77 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; @@ -1633,7 +1632,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);