Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2685850pxy; Mon, 3 May 2021 05:57:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAxUdejzXRG4A3gvlSOykdrKmgDCAeEosCg11Q+SdpNyZmkKkgpQjMyjbXRaJXf1awNJyT X-Received: by 2002:a17:902:74c6:b029:ee:c73c:5c58 with SMTP id f6-20020a17090274c6b02900eec73c5c58mr9054968plt.25.1620046649622; Mon, 03 May 2021 05:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620046649; cv=none; d=google.com; s=arc-20160816; b=I6gQdxN+ftJu6jGDdUE3c0z/TYODiZtVPuz1iXZWv+DTSsgiMqiqKKcoURAeWom2cz 8aRLVhLsurEvG9eQLNOjXnpO/DUa2cZCaYfE8zn+rKkHPkZK4w/LV7elzHxNlzfcUkO1 sc8cwuvzgkr2ZdhVDp2b8EMbN4+IXknNlOns17j+nXHKhJ1EqC+Y4cjHxSvoO3K+fc9e 9fYSEhYYce6atxREJCOw84+kzIeCfByRdnzPmSwFgqZ9gjcvUTToQXHCydkDga+4omjE Ry+tvvujwjoC//0y4/guE8jUTipFP1cMSl5uhhf0oZKF8QbiyW4L0Y/88jFBSEbW2Ues oVEA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=t3aBsVYgIL5qSPvi8WQVQXa9kRrbPsCuE253rP+iwkY=; b=cugbHYW64ahwQdmozhfrnO07URKSeoe7G2MPEcL1S5vr04yJTYurc83/qBOvLVLP4z PdixzOSAl74C2h8tjlW5R5OELIIiqAV6+DXAN8bcQXK5+HVjhyYV5TEq/0QeMBFINvBe H9JOGfKkIbAPuP+i0ji5ehLsmbveDFdqRvtesOaWxbCm3pBOmPhnDCZ5VrTm/HoWeO+I wUld4HZ/fD1qOigXcb52yv+Bn4lbBWTgMg8DczBC/KSSO42s43TWXU+1pXMrR68ZJasf zvfyj4d7hRiFwNYdvMKwVmGFy/VaiI0nOjGIGXjmG/l9DOJNH3jmIsc9HgDPMtfF94ZB aB8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HBlzS4U1; 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 j11si13364534pff.168.2021.05.03.05.57.16; Mon, 03 May 2021 05:57:29 -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=HBlzS4U1; 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 S233709AbhECMAa (ORCPT + 99 others); Mon, 3 May 2021 08:00:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:34308 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233655AbhECMAP (ORCPT ); Mon, 3 May 2021 08:00:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8595561244; Mon, 3 May 2021 11:59:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620043162; bh=79KSAg+ELuxOmSOG2bH4r4Vxa/Y8lQHe/WMHUNpcQ4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HBlzS4U1eIFpHOW4Tuf0R/1kJavMSmGXpCaRjvk4BUPxe43Oj6O4evHIy+xwNwuWS 0DIQi2+GsWGdY8e+f+zD+N8NIG4Xl5qiAm2CmZzSHTtlWD4gZGJvPC3bRcnYlSmBto 4+1Sl2DC6hyt1y6qPCmZZmVDhZA5Nyj6DDfDsOGE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Kangjie Lu , stable , Guenter Roeck Subject: [PATCH 04/69] Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe" Date: Mon, 3 May 2021 13:56:31 +0200 Message-Id: <20210503115736.2104747-5-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210503115736.2104747-1-gregkh@linuxfoundation.org> References: <20210503115736.2104747-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Greg Kroah-Hartman --- drivers/hwmon/lm80.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c index ac4adb44b224..97ab491d2922 100644 --- a/drivers/hwmon/lm80.c +++ b/drivers/hwmon/lm80.c @@ -596,7 +596,6 @@ static int lm80_probe(struct i2c_client *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 *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); -- 2.31.1