Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3524976pxj; Mon, 24 May 2021 08:38:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztcJNdC/jMDFVYZYeAwFjpI3/8io9RR0B7nEttxheRsQ++R1zrFD6SjCt1ZsVJfqzaiJFX X-Received: by 2002:a05:6e02:12c5:: with SMTP id i5mr18299997ilm.101.1621870713531; Mon, 24 May 2021 08:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621870713; cv=none; d=google.com; s=arc-20160816; b=jnDoI1r1V3zrz0cBMf1GoLS1uGEtJJxu1SxpOAFenPi2PaK/OzherdrqbBfjRwXqva WECl6mMxfmOGoFLnlhpgolOP73/DpH4eyTQjSL+ASddRfcAow8QoQ6L7HHpfipebJo4I t7JNpTVypVzJyCz29Whr0sxc+GBWwCLw+fXM4lKQAlK9OiBXRFd3T+bItRvSy3Ty3w7q e3l4aXc2qiXwEQ64rQppj9RbLMRa3363ZqN3fiqc9EySrbB1L1P7KXsNGLGISZP8e6O5 I0KMCbnwdd3Cxpj39SUa/tCv7Bo62MctCJSv01uoBSuvI4ykKcNfKsocXuFM7KhZTmMm ixxQ== 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=qAMdbvmRqLHFmLiXROmxbSeFFIc4QFESkRfwzsEyZwM=; b=rT3wd/0tXmSSEIHR5mc5wSdpDPyIqylPRBxd7ySb0G1pgIjFxTK7vXPI9/KhID18Uy rSm/DQXfGHdxMREKoifyL+1QQ41IpBJD1D8C0r/AeYNwBUywBu55Q52kjJVN0uTN9/2/ hm1G7H2SngtPxRcWPqstjeBf4DN4/eSwevNbRQimKG5n4ztCdlDCeHAHD6TLCWf2fs7w htXLzA7fMM2cDZnrJING8nP1ACmMMYmCzlQ3lcr8anlN1rrXTmRtiu2Rn/gtw3xPPDfh sumd5H5E6/3hG0AYcxL++qD3Sq1TEcj9Fc92GWRzksFdMOjKWsVNG1JfMIHIeynahWsK myug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xVrXLaZq; 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 g15si14364450iln.71.2021.05.24.08.38.20; Mon, 24 May 2021 08:38:33 -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=xVrXLaZq; 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 S232913AbhEXPhv (ORCPT + 99 others); Mon, 24 May 2021 11:37:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:51454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233150AbhEXPed (ORCPT ); Mon, 24 May 2021 11:34:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6AAC06140B; Mon, 24 May 2021 15:32:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870322; bh=jz5lJpbrtEPhliG6O76iXaB5fHjt4HN2bNwhoy5SiXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xVrXLaZqMuaYhRvULWIeQglxT8BufFKk1B2zHkuPIhYPXzRpMXjwjESQwQ/jIc06k d2wp7LZHMOmPcVrWNerMERgB9ees8LJKmqW+ducIh6iHBdMleKVGUkwK2mgSDgsHLQ LMG8WwFNVbRQ6J7caAbCsSCZfSF19hjOqdga5rdY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kangjie Lu , Guenter Roeck Subject: [PATCH 4.9 18/36] Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe" Date: Mon, 24 May 2021 17:25:03 +0200 Message-Id: <20210524152324.751577446@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152324.158146731@linuxfoundation.org> References: <20210524152324.158146731@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 @@ -630,7 +630,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) @@ -643,14 +642,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);