Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3540902pxj; Mon, 24 May 2021 09:00:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2kh9XCLQtpVN/IstplzPAX8bDTM9kGe2l+ZyzYIoE3hAtoNI5G6b0/VcMkBXWKPsaWGTr X-Received: by 2002:a02:970c:: with SMTP id x12mr24861213jai.21.1621872024421; Mon, 24 May 2021 09:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621872024; cv=none; d=google.com; s=arc-20160816; b=TkAW/5zJbx6XUPOZSGp63QaFH3571tnfDqlTEcfyPm206rhSyebYbUzWx+54zDYmfc Yl8rk7IOG8L6JDcV0TCRRQ4iq1li34BAHbCTgpwTxWWXQ+fgVfGKxlL54fVE26tLzDQL JHsUH+QNFkpoU17THd2HmJVzXUIVJqjxGJv72vbnE5PwJN2fsx3F2vIrt6Y+VkkS8bz1 pe7gWriR//5aKjkmX+jhAdewEaFnIa2jhERt1Lxt0zhFQiUuKk8CZ8ymDGuO1Pj78TKs vFfDMqaOOMWolPhLKsVkIeSCsghVfqc75YC+l1eSpL4t5hkmywM5KHPJzMcDAaZc1uTe 51KA== 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=QGJtnRSPy0kLf+I1uzKUIhArGtOeBFOYYl6qyBS/3UR/eZoXeA97aMYXK2opDhHe1z 4TP/O0K9UGbgasXzaO0bYy97BK3aw+IrgbF1feLd4Xjxvrh1WH4FmtiBWCJ29loEQC31 2N4a7BXjB70xYPyd8mzgsNd4i+ltF2hV284S39Va8Llp7I9ggYxl7xNZAosCFQsalL+8 wjIFfb0x7IGehYHq3p1cj0rytef4IztqEkzVas4tQg98D9oInPOzCgQ152/Iq+YPqT45 6QguifwFYy6+2oH5yxq7AqMfCS8aLqz7DLgoQinZ2YSrnBLW3I+Nc7fels4xLOd9aE3N U28Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XgWC6m6A; 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 g11si16655965ilf.108.2021.05.24.09.00.08; Mon, 24 May 2021 09:00:24 -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=XgWC6m6A; 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 S235734AbhEXQBG (ORCPT + 99 others); Mon, 24 May 2021 12:01:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:39954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235463AbhEXPzJ (ORCPT ); Mon, 24 May 2021 11:55:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DDE426192F; Mon, 24 May 2021 15:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870879; bh=FIA/5K/kG1WwB9DXMHcoqy2r/9XvjKvqQCAY6qlo/MU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XgWC6m6A3rY2YmuzMZZxmE3fQ/NZ95f41uYSrOaW9psU5elU9UpYTg83Cu1XJ0MtH MQW76OP9eiE5+1Itkugkdh/REE8Dbe9mlZxeGSJNKYAOX2yKAI96BkrC+Imwj1zWPl engeSoYmgz5nWPbiGzgGjbUKgN5AvUz+devsVd90= 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.10 076/104] Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe" Date: Mon, 24 May 2021 17:26:11 +0200 Message-Id: <20210524152335.375762582@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152332.844251980@linuxfoundation.org> References: <20210524152332.844251980@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);