Received: by 10.213.65.68 with SMTP id h4csp481929imn; Fri, 16 Mar 2018 09:05:09 -0700 (PDT) X-Google-Smtp-Source: AG47ELvSEN9NvAglNV1B3vNYTJNs6eU97wMQrP2n6Fouu3zjc7WcyAY6XUlI8dhJh8+njdYMtsyo X-Received: by 2002:a17:902:9045:: with SMTP id w5-v6mr2802174plz.104.1521216309290; Fri, 16 Mar 2018 09:05:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216309; cv=none; d=google.com; s=arc-20160816; b=zkNEJ+3dhtqDi1z8dxsuAfOykNmtMlDLvnZY4ynbeDG662CbchJm0LWQM5D5UB06vR zGwmniZd/7Y4PESKAoh19KEQqsqDXXUNBr7CMLLGT2tKVfGsSSekGDSJQ8uPXul1u83N T1wLpYQVIZHkOgGlcIGl2CeZcUCAd/bcmftbYqVRe/zBUHZxxeR/LK0vi1+3BluS/A2y jmvmX13zGtXoRxDalMVpTZrZNvgnoko6+Qfd4Fo4OGYy6j8dbvfV/KyP6yKCvvhan1iM mG4SlnRmekwGxHzAB+NU0wyAQmGDvpOjrz+GckgbAHAYaLDVZd9GDYmVLtk58PEzPihc PWrQ== 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=VhZIoIYBJpPs1LRm/9aePPmnyM9UTjykygGthXyItXY=; b=MJsYBE/h+SheBGzl9G0nwnz8i7NtxDUGANcURqm2swvtlAoatrVAupPugJSpgus8oo MeTsHoqfGoYhyqRasn0R4JMqcwYhDYPpa8HAS1Ut4HjPo/ecv1rkM42sbkd6bVBh2eh/ /d50BzO8m8Ri+zhVGRaxWFWhvJMbXgSqP2NMEzWN3Aoocutjp6H/f/9voNpn4omTAi0R +VqYrG3jtuwzO3Zk0Kq9f8ysyouMA/7BsMCUoUFyGQVkIorVhUivC6R08Imf7MU6ocfi P38nTdMFV9OZA+gAHwUCQsN+YK/kZ4kfkiM7NiBwvsVsVp+SBEL8iqNLZCDLnZo0pTtw BTSQ== 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 d8-v6si3387326pli.332.2018.03.16.09.04.54; Fri, 16 Mar 2018 09:05:09 -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 S934653AbeCPQCw (ORCPT + 99 others); Fri, 16 Mar 2018 12:02:52 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44424 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754876AbeCPPmU (ORCPT ); Fri, 16 Mar 2018 11:42:20 -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 B7592FC4; Fri, 16 Mar 2018 15:42:19 +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.15 070/128] power: supply: ab8500_charger: Fix an error handling path Date: Fri, 16 Mar 2018 16:23:31 +0100 Message-Id: <20180316152340.210499398@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180316152336.199007505@linuxfoundation.org> References: <20180316152336.199007505@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.15-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)