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: 151331 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp278927ljp; Fri, 16 Nov 2018 03:02:07 -0800 (PST) X-Google-Smtp-Source: AJdET5eGiLrknBRiArI2u6SXrPc62qrv0QpuNr+orN1vOVd0Urz/p0a1FvGc1DSXhSfZIguSvN8z X-Received: by 2002:a62:5c6:: with SMTP id 189-v6mr10842534pff.193.1542366127586; Fri, 16 Nov 2018 03:02:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542366127; cv=none; d=google.com; s=arc-20160816; b=zff4z+zAgCpBSX4nK0lbKk53C1KcoW+Y2JmRu6IC0ss/ReOlwdoE2AKs724m6FT+Wz Gf+V98NQal0rnQ1G0fi7AvVRzXpb+q626k3Y29i2ZhZnYDea6AWMi0QiQ2aXblAU6Zi4 hmsr0n7Z/S3VQsqkjnDIRMl7xGEvmBea5zZ507nHC04RIySh0akKTmmgY7JwQgiViY7y ZIsONEgKwBOenZt6VUmjFRnaBe+Cm5Htj2rVsCgg3Wc124NdhBXEWHD9ciXIK/y1G+6F jaDwESEiC+9dZLt7+EVG9iWEN6L7cjldhBjxg6W1igchp2ISQsVkatyxjfprytNgzEfB Dd9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=1sCzjJpuyoWAr3SZdjEjaCQC9rkWcsgGFIVrSihaM1o=; b=r58BpS1RvdSpQEftF8RrAf4oynGCR5e9cKllOgDmcFgetxpcBTOLlY7Scq4+mgy/Cv sZY2D2ukSmmFTaS6A23nVf361vycJ/wDDHpNKU5pFSfkPRfXoovfLNFwFV2mYVhG0lh4 9QUWUe8YZHH4cMiLFSW3B3RlRPoC76XUslgGgkyAms0KEnKrqsLEMO5fN6cZxu9Vt6is qMU3Q3c8/zNsdsOFwOqc24NNWh/EQHkaHwe1ZIf0pqFiF1droYETvO56o7qGhERrEgSN LCZVdXojxRabOAyMrxPEMDLC1J55finrwr5m7NI1IbDdWYr7frWWrSavQ5VSQxGMn+s+ STwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EYSmG4fP; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c76si18072978pga.70.2018.11.16.03.02.07; Fri, 16 Nov 2018 03:02:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EYSmG4fP; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389519AbeKPVN5 (ORCPT + 6 others); Fri, 16 Nov 2018 16:13:57 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40312 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389509AbeKPVN4 (ORCPT ); Fri, 16 Nov 2018 16:13:56 -0500 Received: by mail-pf1-f196.google.com with SMTP id x2-v6so11245688pfm.7 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=IKvpSdDA/CWATUMab89gFxz6z2UZwf+PvV7yCcK4y1CsgCa82fJSwG8EkmCy5txWDG L6GoMI32vKec/Xi804NRFHWwdjOIRnXEU2Iz4U4Fzpa6LWLqmFfPmA1VXRuplFLiQCzI 5M+cnXl8k4thEBHARkQUYDBr2Rs4eBU164YOVrVAZ3G9f9XtEyiB6kQvqPV7cgMIFEPy eZatsvsiN7cPK6EYPqBG8J3D3hH9RdYZIFrEU9fd1oi4W121B5i5kekikxCDKIXsZCgi ORcmuaT5lYsIoI90OIGf3Zsgrah0ErvKSSn/R24xVhfn5a7SfBpQk23/Q2PxYisSe4Q8 nbNQ== X-Gm-Message-State: AGRZ1gJFAHn+fQRL+9Z/grf32cFz3W9HEfz0oLWiKKNsTVSJiBfN/npR ehWC7bkuQwc944lv2dm4Ftxu5Q== 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Fix incorrect return value. Signed-off-by: Baolin Wang --- drivers/power/supply/charger-manager.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.7.9.5 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);