Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3884505rwi; Sat, 22 Oct 2022 01:32:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7MOhtShP3iIxZxRqiDFLNTwh1QhYHTiJxkoXWiawCUz+l5+gpAkuwfd5B1hHBtaBDEZneq X-Received: by 2002:a17:906:cc0f:b0:7a1:6786:f55 with SMTP id ml15-20020a170906cc0f00b007a167860f55mr1165450ejb.359.1666427525117; Sat, 22 Oct 2022 01:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666427525; cv=none; d=google.com; s=arc-20160816; b=kb/TegFpIfMgH417h76uH0Uk2HeGVYLKJ0/dwMS0dbeJjcNCRayKBAhKLo2DVI8hSD YIYVMqgtixJAbD4pvtp7gniMLNB9lQfAMkHxIeHO1tXv5C5VVQ/I+wJttv3XO9hgTPaE 1L9vZfnDwSnHyg0psqd+janeLGjkPpuJVscDhCRdMLWiNi0yYo8bVpZJNRxwx4hpIBnQ 21/ad3IfgtHM0Km02xxvjOYo/IqmjeCc1IXMj0XURB9CJaJoXY3JifweVjxfMzBBMQgL wRsQ+ihor4+x85xmeuUr85mLsqYr7YDvusK0NhwaFhpZe5nYiMaoYYGNLbqJW7XiMDQA laMw== 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=PkjOYu1sRZ41cM2ftc84bFIHzzBc7KizG0WnOCs4x7I=; b=FFbA938na6f2XONyySzNJCEEbrByRoJkuK2Ff3WmSdzB93jyo8l+ezyTdfq0vVui6a K9UIEZ5+zKLo2GINeIQ2jukDjaBabj0AiebiqThi90aIZOj3wOt3+3PTwnkR8tkU55oj dYy9FhVGTsJM+6XAceCYrO8KfqPWbvxF35WKAnDG50PYL9DlwItOwOjKzt14Z5CHdoki wirBV9e+NbBimqSgVSmUzXT9vH073CgMKlFlE32cyuiqzH6FF622edEAHt2TGVzAJtPm piJSVkj6ztNzcJ0uLO8+T+4YCD3eazCo/nJwbbEI1rrZubLn72avl5ch9aAPXHH39teR 3DiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LoxpChLb; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a50ab03000000b00443e3fe60a0si18760074edc.622.2022.10.22.01.31.38; Sat, 22 Oct 2022 01:32:05 -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=@linuxfoundation.org header.s=korg header.b=LoxpChLb; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232418AbiJVH66 (ORCPT + 99 others); Sat, 22 Oct 2022 03:58:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232126AbiJVHyH (ORCPT ); Sat, 22 Oct 2022 03:54:07 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3DB7951C5; Sat, 22 Oct 2022 00:47:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id C78BCCE2C98; Sat, 22 Oct 2022 07:38:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5A78C433C1; Sat, 22 Oct 2022 07:38:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424286; bh=zhPUD++s41ALFKJlkWcRVcaro7JOAzgATab/HtGbOz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LoxpChLbtaq9P/LtSTQ8SUWX76tJkN3fAcCSRY0RJUlVQbMEfMepBVxP83ZgfESbp lRK+I0OVJ6q/0eHh0SCBOuMlwK/WMzaGuftPwYaCtTpKJPNYn7T4FmL2MI5PRy3FQm pzVWGTC0UU/hxwckCLZ0ZWN2BCwRnyz7OVo6/wHc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Dan Carpenter , Neil Armstrong , Viresh Kumar Subject: [PATCH 5.19 089/717] cpufreq: qcom-cpufreq-hw: Fix uninitialized throttled_freq warning Date: Sat, 22 Oct 2022 09:19:28 +0200 Message-Id: <20221022072431.091471458@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 From: Viresh Kumar commit 91dc90fdb8b8199519a3aac9c46a433b02223c5b upstream. Commit 6240aaad75e1 was supposed to drop the reference count to the OPP, instead it avoided more stuff if the OPP isn't found. This isn't entirely correct. We already have a frequency value available, we just couldn't align it with an OPP in case of IS_ERR(opp). Lets continue with updating thermal pressure, etc, even if we aren't able to find an OPP here. This fixes warning generated by the 'smatch' tool. Fixes: 6240aaad75e1 ("cpufreq: qcom-hw: fix the opp entries refcounting") Cc: v5.18+ # v5.18+ Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Neil Armstrong Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/cpufreq/qcom-cpufreq-hw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -317,14 +317,14 @@ static void qcom_lmh_dcvs_notify(struct if (IS_ERR(opp)) { dev_warn(dev, "Can't find the OPP for throttling: %pe!\n", opp); } else { - throttled_freq = freq_hz / HZ_PER_KHZ; - - /* Update thermal pressure (the boost frequencies are accepted) */ - arch_update_thermal_pressure(policy->related_cpus, throttled_freq); - dev_pm_opp_put(opp); } + throttled_freq = freq_hz / HZ_PER_KHZ; + + /* Update thermal pressure (the boost frequencies are accepted) */ + arch_update_thermal_pressure(policy->related_cpus, throttled_freq); + /* * In the unlikely case policy is unregistered do not enable * polling or h/w interrupt