Received: by 10.213.65.68 with SMTP id h4csp467485imn; Fri, 16 Mar 2018 08:38:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELv451lD1uxY1wo/eCIHLtjOkgUVD/0Z9oJdXnEtZoa3IH6bLCNKFWW19HpF7dMWBy/NBFAc X-Received: by 10.98.19.10 with SMTP id b10mr1936373pfj.236.1521214713062; Fri, 16 Mar 2018 08:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521214713; cv=none; d=google.com; s=arc-20160816; b=K6RgVxQcHzv5eE7Uz8W6W2ftUgKUe8urMtyN1Hz03R1TIFd3Hj0mRVl0npoTaSROba PFsCQM11XfFzxcyT6gWCshPOnjbf2Rzus/cJKkvXxCqdErS8z4OZd1S5Nns4re3tWErn DOv3epImRIVGPXAvJurBNNcy0umS9oQ1xdXGAY8rwmOEvh+W2suxBBDWJsZyuHws9ce7 HT7vwtuCOe98XJ8esnmEqe2OhAMS5XQk7MdyHj1wPd4mBNUPowmo3nQ+T7eM6pl1HXKt vmaDbT3urOO32i23CfGzQXYnjj4GrPxBPhPciicYUcHS0H7LrHkvw/LTIfvonmTnM91V UuVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=W5Q27BB1rthFN54HQo35xyhxUgmXmAGpKEbi59wj6MU=; b=D4o5dDs9KNPd0F1W9ypRgZwII1cPTCCZMgoK2009UOFbswjn/bkUo0MfCuk4XKHaWj Pk34Fcl+8TJqh+7YnsPytcTY+NrpVt4+QNE2GcVVGEAp/r+P/3J87dpuDV4MKtsnG4Xi vls3+0oEDohOPPFvO1APwu8c88xry1hzrNgkHgQCtEXpLudAy2eKquzk6cVDPXCUxX1X pE/kTDZSMWApgj1kRQcOhALbT8GNDU3/I907xLxhAPkMQaN+rOGOnzPjL5OB03KBiTVB mobgYjEWbThPXaKXOTCTH4SiNgBUd7ZUc47LbCnP609DXKoMaAPRjlgCiAkRzkoCsl9+ Sizg== 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 g1-v6si5913633pli.676.2018.03.16.08.38.18; Fri, 16 Mar 2018 08:38:33 -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 S964779AbeCPPge (ORCPT + 99 others); Fri, 16 Mar 2018 11:36:34 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40274 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934286AbeCPPg0 (ORCPT ); Fri, 16 Mar 2018 11:36:26 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6A57D10D0; Fri, 16 Mar 2018 15:36:25 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Sebastian Reichel , Sasha Levin Subject: [PATCH 4.14 057/109] power: supply: ab8500_charger: Fix an error handling path Date: Fri, 16 Mar 2018 16:23:26 +0100 Message-Id: <20180316152333.054464946@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152329.844663293@linuxfoundation.org> References: <20180316152329.844663293@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe JAILLET [ Upstream commit bf59fddde1c3eab89eb8dca8f3d3dc097887d2bb ] 'ret' is know to be 0 at this point, because it has not been updated by the the previous call to 'abx500_mask_and_set_register_interruptible()'. Fix it by updating 'ret' before checking if an error occurred. Fixes: 84edbeeab67c ("ab8500-charger: AB8500 charger driver") Signed-off-by: Christophe JAILLET Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/power/supply/ab8500_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/power/supply/ab8500_charger.c +++ b/drivers/power/supply/ab8500_charger.c @@ -3218,7 +3218,7 @@ static int ab8500_charger_init_hw_regist } /* Enable backup battery charging */ - abx500_mask_and_set_register_interruptible(di->dev, + ret = abx500_mask_and_set_register_interruptible(di->dev, AB8500_RTC, AB8500_RTC_CTRL_REG, RTC_BUP_CH_ENA, RTC_BUP_CH_ENA); if (ret < 0)