Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2373420rwp; Fri, 14 Jul 2023 05:21:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlE77azJ6FFTKC4Jgs1wQTBZL6ohzFxULZhOk6G21PSAb/R3Lkl1YTFEIXTyuyA2SnHPU3/Q X-Received: by 2002:aa7:d38e:0:b0:51d:9dd1:29d0 with SMTP id x14-20020aa7d38e000000b0051d9dd129d0mr4469066edq.23.1689337307447; Fri, 14 Jul 2023 05:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689337307; cv=none; d=google.com; s=arc-20160816; b=E7kTotHUGUus4Nz5eSwozjAD9o3WEnq08NvTlE4IL3LhWDjCrj1qYbAvg8i3+ehQEz OGfa01IEF6cEXSiof+4aNhg02YJhbhAhmY6v0mELveFWSztlUy+zVHukF1xpm/6Pj7DD 94m3mvmiz2VYZBDfaDSQ15cLrKXZw/Xdx/5kfz5Xr0ZVEiT/uE9EtMvIVGxuZqfWLpSU 3XJEOWnWWkYaypooYPXJrjTujn4e5W1WgiwR2JhBfNxJIB00OkDB8ZYSBE1Na7W+/0Oc FrsrPBGPazlp4z0bKnGIpGJmqjTZbSjtOeryl3e/4kDjnBv165yehaq2WaQnp2aX/fDt gdWg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=EIFl8xI2UuButzAPajsmIgl+1a2EybRrJWZfodELGUY=; fh=cQJG9ncmUHEi5k8VvGL8cvRcAY6ILGkce8QR4cRkijg=; b=y10bmJ6o6Af1yFjoe1oard6AlBmC2BZZCFSzwfFRyNw/L88HkqqL9q+vBxD0Ze2tWQ ZFAyYsiG/0gpc7AM6iFjAaVTc75RGyu+pfcMA3LFURqWeQS4pxj0rc6mcW3bhnGgIS+8 +YTLJX4pE+svDqc5X1fNsk+1pE+9451oD7DC2PiMKz7qeO0MfpN1Bu2MzesX+yo+/r6/ MqAYr4EGu6zSBel/dS7UZ+GUHQcAglEfnfveiU7IMHarvis5GS2Mf9JARC62821d/8r5 g7Aq3THJV1hhZXUfXNFwKNy+EGKdpFm7ectdM8ie3GHUbM97026wLJyFhSi+puHKdjW7 qnBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=aVNQhIPQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020aa7ca4b000000b0051ddc36463dsi9345087edt.629.2023.07.14.05.21.22; Fri, 14 Jul 2023 05:21:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=aVNQhIPQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230101AbjGNMIj (ORCPT + 99 others); Fri, 14 Jul 2023 08:08:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235132AbjGNMIh (ORCPT ); Fri, 14 Jul 2023 08:08:37 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5210E358D; Fri, 14 Jul 2023 05:08:34 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9922d6f003cso241551366b.0; Fri, 14 Jul 2023 05:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689336512; x=1691928512; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=EIFl8xI2UuButzAPajsmIgl+1a2EybRrJWZfodELGUY=; b=aVNQhIPQ1nkqW5pkVpZdSjcL6JZy9VedWY2TZHdFs0Lu7/c2LpssorRCvcSTCioaBA iCNUmw5Efykan1bmbS11TBRHhNY3ryMQACoTDO11aEOvIA3kIgnLF6dBa9fZsYyxECFi n9XU5n+danqERRXMIbR/IXKpBwwnrrhHFYBDH1Oi1mRB4ImVyNclf9Zjwq1/8V2jcMR/ n6p83BdU82ZU2WHwVFkNeZO3bAnDwdSeqEKNiA4spxHbzZQb+HBORs+Pks5oswT19hHG V8ItEOdMC/5XGUFGzrKsqw3xUop9xFU6nkbZBGRUXJKabP834zs2VNGCbMlIUPr50Qcu +y1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689336512; x=1691928512; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EIFl8xI2UuButzAPajsmIgl+1a2EybRrJWZfodELGUY=; b=Fvug0N5fFmFXO4OnXDFiUkS/rDF2h1IMcfoqYYPAnVI6hRkmcO+5uwXCRKrEwhn7gt 1GZN+ZM4jXozC0UOY6hDvHFyxB2KFewCJxj8DPQ/zPmklCDYD5DQtIIuChmq2mNC0BOJ zyYQgU1MASk+fBzVlHpxhHS3idsmYJBrbyiMHe6X7LeYTWbnZXbnUuz2G1j1upPI+ZVk FWjHOWt5P84gN5oZNNYSg8Hn+BsrjuygIkGVUIAkoaiL2bGqNRZH6v63A/IbGO+BCTEk 37Uu/F+RsyGEPI58ARYzBV3ky0alyxIZNf03QT1Dn/doo3jaxRQWewNsihIZvKGcOUNR h8zA== X-Gm-Message-State: ABy/qLb270s/iCuGMAr17mIeIs1H6sriNBgmQdfYBsztfOYbx8+bS0th zP0tPgRg9npOIKeYxANZdNWmNrUrsLa7YA== X-Received: by 2002:a17:906:ce3a:b0:988:9d0f:db52 with SMTP id sd26-20020a170906ce3a00b009889d0fdb52mr3941880ejb.35.1689336512361; Fri, 14 Jul 2023 05:08:32 -0700 (PDT) Received: from fedora.. (cable-178-148-234-71.dynamic.sbb.rs. [178.148.234.71]) by smtp.gmail.com with ESMTPSA id hb24-20020a170906b89800b00977c7566ccbsm5238148ejb.164.2023.07.14.05.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 05:08:31 -0700 (PDT) From: Aleksa Savic To: linux-hwmon@vger.kernel.org Cc: Aleksa Savic , stable@vger.kernel.org, Jack Doan , Jean Delvare , Guenter Roeck , linux-kernel@vger.kernel.org Subject: [PATCH] hwmon: (aquacomputer_d5next) Fix incorrect PWM value readout Date: Fri, 14 Jul 2023 14:07:11 +0200 Message-ID: <20230714120712.16721-1-savicaleksa83@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 662d20b3a5af ("hwmon: (aquacomputer_d5next) Add support for temperature sensor offsets") changed aqc_get_ctrl_val() to return the value through a parameter instead of through the return value, but didn't fix up a case that relied on the old behavior. Fix it to use the proper received value and not the return code. Fixes: 662d20b3a5af ("hwmon: (aquacomputer_d5next) Add support for temperature sensor offsets") Cc: stable@vger.kernel.org Signed-off-by: Aleksa Savic --- drivers/hwmon/aquacomputer_d5next.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/aquacomputer_d5next.c b/drivers/hwmon/aquacomputer_d5next.c index a981f7086114..a997dbcb563f 100644 --- a/drivers/hwmon/aquacomputer_d5next.c +++ b/drivers/hwmon/aquacomputer_d5next.c @@ -1027,7 +1027,7 @@ static int aqc_read(struct device *dev, enum hwmon_sensor_types type, u32 attr, if (ret < 0) return ret; - *val = aqc_percent_to_pwm(ret); + *val = aqc_percent_to_pwm(*val); break; } break; -- 2.35.0