Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp674948img; Fri, 22 Mar 2019 06:21:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqylwYiXrfgkc2glb8uYxzxPPKFWhVlPlpQzb7q1jUzupm0Cj0DNdM1iEt2VXUMSgjnzWy5s X-Received: by 2002:a62:5789:: with SMTP id i9mr8944568pfj.75.1553260915887; Fri, 22 Mar 2019 06:21:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553260915; cv=none; d=google.com; s=arc-20160816; b=F62er/+xUdLfAB6CWqFwUZHylBIFqYrmDfHkQOWx92cqGjP/scU+bb3eY1pbQnBPq+ dV6/gqfpOm26U3FQurIPZsVksxPpV4/VB3hxk2EVeYzy2lhTk3DL14TTGrGHntGkpgjP 21b/7LjyBkirLX7NzBl/NtpyE7to8jAk9mNTNvcf8hDpNI6ikCoRR4RpNuVF/vjuRxiN CLtcNxrv84UDzsKCwkYoolPKyFKl0a3ad+IBKrqMBn97nuIJI1Z+RI93ucqVCoQx3dMw ein+4j5WE3yz0FjcHHe9NNFGwVl+WGRY5nkgBqjIA/PwksFhfZMx8n6MUgfLkXMvhkPk pAYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MHGKMNMS4paxoj6bedGxjm+XJwtkg/G8+ypVaDCKHsU=; b=DntLFHcEmgzol1kGOeCoYHddlk9J7SWwx8xBAgUyt/dFNY8fYQJE+aURMY7AqUbyde rMlJqk/18qmBg96+fOAXg33ZrFsx4Jr+de9mVkCIKGTDaXoJ+K8qTR1Qz6jnNf71wo2z 6cHVq+ssuFMAC7DCfC096u3wkQYeeaJP7tNoRgpYk9/c1djHzPIWmqHuhvSaJOj096AP qwztXsccoT/89pNEPzXRiA7tWJzmcvrA0n/ev//E37FqzNXZbZWvEgXCJ0VyPAWPrxbB 9R5O80Q3VQobZQc7CULk2MhC2T4D+N+VwZbVON+xSHH//f+y5Vmctwjh4n1uYQ/frYUq gbdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wl+jQwUS; 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 cu11si7399830plb.376.2019.03.22.06.21.41; Fri, 22 Mar 2019 06:21:55 -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; dkim=pass header.i=@kernel.org header.s=default header.b=wl+jQwUS; 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 S1728381AbfCVLUc (ORCPT + 99 others); Fri, 22 Mar 2019 07:20:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:46812 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728363AbfCVLU2 (ORCPT ); Fri, 22 Mar 2019 07:20:28 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF890218A2; Fri, 22 Mar 2019 11:20:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553253628; bh=W/zAZItphTK6xwyTX3Rq8ezjf79qTQHew8biQsbiNEE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wl+jQwUS4GK/ySiK0ljMjerVqJB9V2MvjwS3Ggq7eEPe8LFxkLkOc5mCaEIcsnRwb 3M+eEw65Uf6DfPKWfxh3NhjDgkEXvmM2NFqpqvmKHd7lyIeSMg0jtzinW9hijMgVSa ezbUf6cT+gp59uMWoQsYjMET5YLfbtkdeOhl49V8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Linus Walleij , Lee Jones , Sasha Levin Subject: [PATCH 3.18 007/134] mfd: ab8500-core: Return zero in get_register_interruptible() Date: Fri, 22 Mar 2019 12:13:40 +0100 Message-Id: <20190322111210.743329126@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111210.465931067@linuxfoundation.org> References: <20190322111210.465931067@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 10628e3ecf544fa2e4e24f8e112d95c37884dc98 ] This function is supposed to return zero on success or negative error codes on error. Unfortunately, there is a bug so it sometimes returns non-zero, positive numbers on success. I noticed this bug during review and I can't test it. It does appear that the return is sometimes propogated back to _regmap_read() where all non-zero returns are treated as failure so this may affect run time. Fixes: 47c1697508f2 ("mfd: Align ab8500 with the abx500 interface") Signed-off-by: Dan Carpenter Reviewed-by: Linus Walleij Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/mfd/ab8500-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c index bde2fc0724103..44ebb84c2e747 100644 --- a/drivers/mfd/ab8500-core.c +++ b/drivers/mfd/ab8500-core.c @@ -259,7 +259,7 @@ static int get_register_interruptible(struct ab8500 *ab8500, u8 bank, mutex_unlock(&ab8500->lock); dev_vdbg(ab8500->dev, "rd: addr %#x => data %#x\n", addr, ret); - return ret; + return (ret < 0) ? ret : 0; } static int ab8500_get_register(struct device *dev, u8 bank, -- 2.19.1