Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3550141pxj; Mon, 24 May 2021 09:10:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRC3d6lOlHSOoFr8f9259gCQ/hIonl1SBL7j7pFHabh/nOJtF4ngnd5BZTul2EtffLvMMY X-Received: by 2002:a05:6638:37a6:: with SMTP id w38mr25026748jal.106.1621872600979; Mon, 24 May 2021 09:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621872600; cv=none; d=google.com; s=arc-20160816; b=ytlA6HRnUAgeCQSVRp5oWrEO12QfNQ+5OLTlhfXvFXxTw4JZYNIKH8xDUWT6JpJcTt KViIKlRP23jRh7pzCjdWmRYmtt/EwYx95yaRvbLZv+BMsFbkeVUB5ABwduzNrc2RdkcI HG6rAWSJItqiB4E1515eDifoSK5V7Rr3rVoW6CL9mKt8ZS00BM9xbB6bln0C6GOFpIUi YAurlnVbYnPzVu7p4xiPZfFpKwjeiZzfpAXprfTuWI1nQrQN6fbXvIa1FIMmszhNMeed R/VTyHUgtERQJJB7Lz12D9UzovbGYYL2RS84jubQVB/JvXf9TqCKHMpVlb7dqcedZbEM 4ZyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zqOhM3Q6WsJPZzHhV+stI8lsFhKusffrbMlnc3/tl6g=; b=uqZLu/oDwmaCgEGULOODUe2nrxWlcQCGr481GgKGJfNLT6YNOxVcWUvLtN7iSncBsM 8Ej9CMWkFsdVFuGUB84SQIkJdx47a7IxmmRza9MnKw6vVB8/s5A0bFuw8BzndoeM1wRM alu9arhBdr8XUeGPKnqw7QEMERcZ/+tpTj4cJ67GT7yDEYRALZsqAXOnX09p6ZVXRjh8 8/HyujssRW4YqotIxVK9KURYvtJO67xxCkUyNBrk2syNJdsW9JYhVqmqV+jnuTLQwmWj K6npmlejMcTWmnc/iNHP5GX505m9c+9Ux+gVRyw0nvjybyWDuyDcvPbSgl+aHSi2HbJ+ wkTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=w7z3Q6WJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si17133464iol.44.2021.05.24.09.09.48; Mon, 24 May 2021 09:10:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=w7z3Q6WJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237914AbhEXQJW (ORCPT + 99 others); Mon, 24 May 2021 12:09:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:42710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235998AbhEXQBC (ORCPT ); Mon, 24 May 2021 12:01:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DC4BF61490; Mon, 24 May 2021 15:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621871194; bh=FIA/5K/kG1WwB9DXMHcoqy2r/9XvjKvqQCAY6qlo/MU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w7z3Q6WJ8FUNT3iITdHjFS0933jt0hkBQLyZj7lc8AIt9ICqmfWV6WwPu/4koevbg B1Re/nfBPWOKK0AJgRzBwKEQ1KWHkVxG9PPm6NOGqe+JYpZ47KP3cCWnmH00bPzPmy Ys82lUecmjiNT0KeIcQq5pb/VuPOD7uKVg4m+raA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kangjie Lu , Guenter Roeck Subject: [PATCH 5.12 099/127] Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe" Date: Mon, 24 May 2021 17:26:56 +0200 Message-Id: <20210524152338.211887276@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152334.857620285@linuxfoundation.org> References: <20210524152334.857620285@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman commit 99ae3417672a6d4a3bf68d4fc43d7c6ca074d477 upstream. This reverts commit 9aa3aa15f4c2f74f47afd6c5db4b420fadf3f315. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, it was determined that this commit is not needed at all so just revert it. Also, the call to lm80_init_client() was not properly handled, so if error handling is needed in the lm80_probe() function, then it should be done properly, not half-baked like the commit being reverted here did. Cc: Kangjie Lu Fixes: 9aa3aa15f4c2 ("hwmon: (lm80) fix a missing check of bus read in lm80 probe") Cc: stable Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20210503115736.2104747-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- drivers/hwmon/lm80.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) --- a/drivers/hwmon/lm80.c +++ b/drivers/hwmon/lm80.c @@ -596,7 +596,6 @@ static int lm80_probe(struct i2c_client struct device *dev = &client->dev; struct device *hwmon_dev; struct lm80_data *data; - int rv; data = devm_kzalloc(dev, sizeof(struct lm80_data), GFP_KERNEL); if (!data) @@ -609,14 +608,8 @@ static int lm80_probe(struct i2c_client lm80_init_client(client); /* A few vars need to be filled upon startup */ - rv = lm80_read_value(client, LM80_REG_FAN_MIN(1)); - if (rv < 0) - return rv; - data->fan[f_min][0] = rv; - rv = lm80_read_value(client, LM80_REG_FAN_MIN(2)); - if (rv < 0) - return rv; - data->fan[f_min][1] = rv; + data->fan[f_min][0] = lm80_read_value(client, LM80_REG_FAN_MIN(1)); + data->fan[f_min][1] = lm80_read_value(client, LM80_REG_FAN_MIN(2)); hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name, data, lm80_groups);