Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3527538pxj; Mon, 24 May 2021 08:42:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwav4i8u9vrNilC+xCtBReiWh2N+KiadRMuRz4QgoaYpHaln3Fe2qbWjg7ippnJyeiZ4Tjj X-Received: by 2002:a05:6e02:1046:: with SMTP id p6mr16537377ilj.86.1621870923511; Mon, 24 May 2021 08:42:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621870923; cv=none; d=google.com; s=arc-20160816; b=K4KL4wpCcpbptu91vZET82+HBs20I+RtJnjYOLEeboVJHfs4xaD+eIoVtSHdYYLV/Q BrT80ATjlvfL5qFCYo0IbQCYqRwbdNJ5O9DaPQ4PRY00RSGviTLncibXMtCElZU24bra L2GDCna/6b5rPBlfaQM1gImaNKgCJu/949ACy1I4rizn/A+NJLHQLAAQV6nwGLev7NJK AAc4rTM5b1I+yJkl5mLS6rbOtGXPiDoJbOFKbouEOWu5c05IsnvZ221p5dLLArHJByuY JcWquBjv4EvgEsBLHzAatrG05nx3FaKUENgPFHkU/e/EsINge23oaUUb83EpOwuejU4H dHjQ== 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=AYAIlRyv43MFGZS/K6NhfI4pFUqaBFq8KYOOIIob9VstLiFbpV79SdoPAUvbAWAoJm fqbxrJ6VzJDUs7CU2kcz4a9aJ7O87g7yFl9ekmvZdOIDGcpi713uaKryjKfNHNlZIJTz lia4/bJx8aRMBwmr7diD3dnPvbi6bbN5ji2bNpckIlYnwxTfQENKktj79bTC8XEtTQPm ncqz4yP27o/G+0CXsiGkKWWaW95K7T/MX2UsX1Ho0Sli9aTUODHvVCqo2AKLGt2eSUKI fg8/UF2OJBOwCoI5aesBlJbK5wg9cVpvNTq8X+/OZ55+BFn2tfpyTYXWWOod4gBry89q fX+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=im1bUHfV; 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 h127si13688024iof.102.2021.05.24.08.41.50; Mon, 24 May 2021 08:42:03 -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=im1bUHfV; 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 S233550AbhEXPmG (ORCPT + 99 others); Mon, 24 May 2021 11:42:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:56260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232974AbhEXPiV (ORCPT ); Mon, 24 May 2021 11:38:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1C03361425; Mon, 24 May 2021 15:33:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870405; bh=jz5lJpbrtEPhliG6O76iXaB5fHjt4HN2bNwhoy5SiXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=im1bUHfV7FFETRZEtmANdXg+qz9bGVPmCkCMX9Yn8br4kI8bALJlHxO6joQdl1FW+ cn4DCVvhMrVio7pXMX3+UfvZAxszFNdRQ+hDvXvo0JeuVmc7AKLaxS9UC5ZYdf20BD DuUx1NB5x29qn7KoatwVzCOc3v8jE9AAqivfWvRA= 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.14 19/37] Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe" Date: Mon, 24 May 2021 17:25:23 +0200 Message-Id: <20210524152324.833261636@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152324.199089755@linuxfoundation.org> References: <20210524152324.199089755@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);