Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3531142pxj; Mon, 24 May 2021 08:47:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyh2f6OmgxQhO1MwPyppwv/Xi/qiwGdzk7HV/hE1oCQISVJmt0EENZLQkYx9zQTcyDc6YTP X-Received: by 2002:a05:6e02:1b05:: with SMTP id i5mr19067221ilv.204.1621871236929; Mon, 24 May 2021 08:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621871236; cv=none; d=google.com; s=arc-20160816; b=RcyMN1czgXbzuegIsHgl9nK8um5jvfL2qikIFIiE8G8QJP+Zr8sN7xCS2zEZ4ZOf8q RssTpMoGqL7o/QwI8OM8LcoRW4qAE7O3vFLkT0zgQtojS89q+K50dpP96dmt3PFrq7B3 Qr7Y0dbI2V5KZvYVEwUDv9BTFenmXliX0kDxrJKQM0QZ8csRLwoBm/MGauLXgxuNNmZt jnjP7VuU1p/5aCeaQ8CirWnvJGKjMubqJXgMGjMIxlk5Ij2Galcznu/NzFTgwB10YSi2 PEEo+cCvE1ttuVvuYJK+STQszxgoJPRAnKBraeycOMvkXQ1RXK7rtElvcvjKsXs7rAJe m+zQ== 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=LDkV4dnfhAZFqPDOH717ebkHvttzvmA+uUc7Iwooj7Zd+nau50wyK8USYxiekebFa6 SCDjEuo5/2BuuFG6dewyzmy+40q/9/Ce8StM0t2ORVBzT3LnXE/aF21Qn1Ved+J3yli9 VwXEemjb5RU1fOctzeZGbg+F2ksIOmdHUQBgtTNUqFPlmOa0Q3Y5vGrhmP4/myxxlpIH 1TY43RwSd953bwW/5pppDrw/KjkWem48n0C+qH89cM1bzXaP3tPd8hqt0hGK1t97Wwp9 +cGemWlPl6ReNEPshFWy8QJQJG4n9QAkuvtPE27l0s/sFNGAzdU7qGVPwssrsSokYhag xnNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MXmru4TF; 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 v12si2973129iom.38.2021.05.24.08.47.03; Mon, 24 May 2021 08:47:16 -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=MXmru4TF; 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 S234536AbhEXPrg (ORCPT + 99 others); Mon, 24 May 2021 11:47:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:56778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233165AbhEXPmw (ORCPT ); Mon, 24 May 2021 11:42:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 70A236140A; Mon, 24 May 2021 15:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870507; bh=jz5lJpbrtEPhliG6O76iXaB5fHjt4HN2bNwhoy5SiXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MXmru4TFHA8Xn+XQ8rop02FgQOy9H/Nz/NOYLZltQ9IBtfZsp771ME9O9C1vA1m0y U3lkPuO45F7WMi+wU2Rdqe67YBNd3LHcgsimYKMyXQsX/T5s3u9QITXpqtozk0yy+j BY9Jm8kCrtOLJ2IDg+RSUfTiVIJ9F0BIiFotBNjI= 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.19 28/49] Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe" Date: Mon, 24 May 2021 17:25:39 +0200 Message-Id: <20210524152325.289902282@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152324.382084875@linuxfoundation.org> References: <20210524152324.382084875@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);