Received: by 10.213.65.68 with SMTP id h4csp26976imn; Mon, 19 Mar 2018 18:23:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELtqdGgaHsXa11L5q7+L5FBILeQabqpUoZJZi9w8DfTNYmc+uf7d34E3r/9rqWh0rsLUvf4d X-Received: by 10.101.83.136 with SMTP id x8mr10448591pgq.288.1521509013221; Mon, 19 Mar 2018 18:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521509013; cv=none; d=google.com; s=arc-20160816; b=vc2RIa6Ic393P4zRsnLC+R3D73xdqYgHau6uHlxp81UxNXIRPuk9aVdmbvbADLbLln u0YhQuJ4RyN8kkc7RVlStH7NM875toAa5AjExCWg0+bVkHtVsGyTYR46Er5guSev3ybF /fbJNKYYLY2+kbvFXs9/6YMRkbsW6A+bo430ArQs048eAK6CQlFGagSb3K0afZQis6l/ YQp2K/KqEr834D5IHMYJJ9D7mUGBDtWiAwU8CGK84odLazkhLFTHtTQI0VqQFlkqfeym 7mLY15OS4NqAIjI1xyc2lZwvMgHKZQsYiUh08dx7buYU/Pnof9+Lag2DwNm0I+ajegKw HWyA== 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=QUYtdfBZDl4uHE9YtxdPihvbJCXXvU8q8UBzlSdTQ2w=; b=Yo/LjBPIb94t1nXbYPZV/z/klJo39+SLRbdvlmbgxnqr0iDh2EvCA+S3dMYgOnZjEw b/PfEYNr+livn+eImo+klwyiZI68OEAw0FeqcNSfZJWDoJTf+Bxf/099nJSyWOlkI5LV JMwUZP/LK+0eCGFxTNTSld15o3tsY8StJpjHTKY3kq7+9S++joSncGput5EtJVqtDjrn FfKpARCREl/C6vfETI1KyLPmJyj5RenCtIb0vxc9j4c9FlMC7vv2yiwpF03LIYWqK57K b1DTwuLwHlizshCialI0+UvHANU8BBOVb5Shm82Raz86JWJfPdoiMem3gyg9Tve8yZZL P5gQ== 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 v7si354370pfi.403.2018.03.19.18.23.17; Mon, 19 Mar 2018 18:23: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 S970072AbeCSTKe (ORCPT + 99 others); Mon, 19 Mar 2018 15:10:34 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51324 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031697AbeCSS1l (ORCPT ); Mon, 19 Mar 2018 14:27:41 -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 9307D126D; Mon, 19 Mar 2018 18:27:40 +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.9 182/241] power: supply: ab8500_charger: Fix an error handling path Date: Mon, 19 Mar 2018 19:07:27 +0100 Message-Id: <20180319180758.677378811@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@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.9-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)