From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: rafael@kernel.org
Cc: error27@gmail.com, Amit Kucheria <amitk@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
linux-pm@vger.kernel.org (open list:THERMAL),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] thermal/drivers/int340x: Fix uninitialized trip_cnt variable
Date: Tue, 24 Jan 2023 17:31:25 +0100 [thread overview]
Message-ID: <20230124163127.445942-1-daniel.lezcano@linaro.org> (raw)
In-Reply-To: <Y8/1ccQLn41w+Vek@kili>
The conversion to the generic trip points missed to initializes the
extra trip points to zero in case the _PATC method is not found.
Set by default the trip_cnt to zero.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
index 7ff5d9b1c490..c113962a599e 100644
--- a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
+++ b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c
@@ -121,7 +121,7 @@ struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *adev,
{
struct int34x_thermal_zone *int34x_thermal_zone;
acpi_status status;
- unsigned long long trip_cnt;
+ unsigned long long trip_cnt = 0;
int trip_mask = 0;
int i, ret;
--
2.34.1
next parent reply other threads:[~2023-01-24 16:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Y8/1ccQLn41w+Vek@kili>
2023-01-24 16:31 ` Daniel Lezcano [this message]
2023-01-24 16:41 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230124163127.445942-1-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amitk@kernel.org \
--cc=error27@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®