Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2503670imm; Mon, 28 May 2018 09:18:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIO9pT2Bc3klU8fsqX52Ms1/7ICnzomPUHmnnpk0/C1LZfyv4PehyKlmUc44X8gsko7lt/Y X-Received: by 2002:a65:4ac3:: with SMTP id c3-v6mr4671364pgu.329.1527524312398; Mon, 28 May 2018 09:18:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527524312; cv=none; d=google.com; s=arc-20160816; b=rPwMrhsJyRBqNzWsqgzEC3CyZMa8vXMEkLcdiD+mL7fRcse23YqhUb1ZC3xHDZPws/ 4xklJ874Qyhiv3KDfureWXXxmUIV7FflRA3i9yLRnn7N7GUjKu0ByoAWHyhbZ1+N65s5 FmHqlvPRUXR6YG9F+KJ4sYyA7aPFdUWlTFxL23bNAfmJZwiCvzG1h3iOJxTrLrOjciDy bByRTloITOeqypp0H8sf4u7rCWr2XnRzwTkk6Cyw4KFkl8u+HJqjIByN523Ce7Olnfl4 7bmwQ0P4Gr9CVb7lJmzhuCQBRaIuMC84WoVaVNpSzOyAaNLL1uLOSsHqD06oAZkhq2HC 98XQ== 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:dkim-signature :arc-authentication-results; bh=/zjEYS7Ph4kcQEsWSJgEicOSffESemNQdFqK4+9/ur0=; b=I7UWSor/YydJQRJ1l8rkfzf/ub7MIH6sfMi0Eesc6XA6JDDChChz5V/RtI+gajxTIG jEwB2HjUD9nCIeEZUNQ+mF5XghxKv5AVN9Q11wY0QiO3NEl9a4dQDBzzv2W48P+VUDr1 7Wxmjux+0cgm0F1ADtFAvgaWDl84Uz8/UXc6m9asvPlhCgYe6mYWlcqViqcZN5FD85m7 2dkv1f8X3sGWeMcljs7mMtp3U1HI+aHL/p+NG8+vbmcfr/T9tcgqGyAZM0+b353gNjh4 LfyW7ivUcaPyd23r1ZOfqLuq/Igdyu6gV4WunNr9OamX+R4fTAf9ZKZpiGo6qcUhp/PE 6nQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XX2oSzE2; 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 b2-v6si24497494pgc.569.2018.05.28.09.18.17; Mon, 28 May 2018 09:18:32 -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=XX2oSzE2; 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 S936770AbeE1KMi (ORCPT + 99 others); Mon, 28 May 2018 06:12:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:60690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936748AbeE1KMe (ORCPT ); Mon, 28 May 2018 06:12:34 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 7A1A42089E; Mon, 28 May 2018 10:12:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502354; bh=Y5FaS0genTYhzHBJUlN47NHZaUqhI62zFW1Yucv8MYc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XX2oSzE2EZe58lCinfrJR9yP10JrjCKtdPHBF+oR0QvenD6uUs8TLPmmJrjMNPkyO KjDw+BQCWiQVw4eNERwXfJK3O2McRFIXH9rEfwvWv+1ZJ9ZU172VbT17AgExZB3rVZ oTCvvqqShlnLid7rS1I12L56MSUxw5a1gapVM1gU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Roeck , Sasha Levin Subject: [PATCH 3.18 155/185] hwmon: (pmbus/adm1275) Accept negative page register values Date: Mon, 28 May 2018 12:03:16 +0200 Message-Id: <20180528100110.620532108@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100050.700971285@linuxfoundation.org> References: <20180528100050.700971285@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 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Guenter Roeck [ Upstream commit ecb29abd4cb0670c616fb563a078f25d777ce530 ] A negative page register value means that no page needs to be selected. This is used by status register read operations and needs to be accepted. The failure to do so so results in missed status and limit registers. Fixes: da8e48ab483e1 ("hwmon: (pmbus) Always call _pmbus_read_byte in core driver") Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/hwmon/pmbus/adm1275.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/hwmon/pmbus/adm1275.c +++ b/drivers/hwmon/pmbus/adm1275.c @@ -67,7 +67,7 @@ static int adm1275_read_word_data(struct const struct adm1275_data *data = to_adm1275_data(info); int ret = 0; - if (page) + if (page > 0) return -ENXIO; switch (reg) { @@ -144,7 +144,7 @@ static int adm1275_write_word_data(struc { int ret; - if (page) + if (page > 0) return -ENXIO; switch (reg) {