From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE33DC4708E for ; Fri, 9 Dec 2022 15:27:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231127AbiLIP1B (ORCPT ); Fri, 9 Dec 2022 10:27:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230429AbiLIP0k (ORCPT ); Fri, 9 Dec 2022 10:26:40 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 614B48F733 for ; Fri, 9 Dec 2022 07:26:34 -0800 (PST) Date: Fri, 09 Dec 2022 15:26:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670599591; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dLAqhVe9ReEh/v9AhZFL0Ja0A9hVe9o5iVlt4EPDFEA=; b=p1J92YSIpdBiI3xhSDVLrDmGGpcuP6f1yGptyINPBnaTLJNrtiHkAazSUkbuMIaV5PVxxn JrSedPlwIEnukfkCKTDlFuiHjiHVyGM8hGMYOrLS8jN+py2/p+8ow7ZJ3MjYdhDksokX35 2JASrgHsC3DYwnMtsp5FgIPokMKf7mwCujSbZnHiQa5TaL+jcrI/JoLnmSwS8OULYDprCA Mvzc80/dTwsMYpk+iwofSyzS7i/09gzybCmkHmqa0RrvI/ATCsQyUYnDBau5n5uUM2AhqN AF8iz9m5MtFvenB4H57VpoLklUEjsP30bs2WPQtFSq6tFNw5MG+h6Vqm+KZ9Bg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670599591; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dLAqhVe9ReEh/v9AhZFL0Ja0A9hVe9o5iVlt4EPDFEA=; b=a2TVXoQ4tHdN1iOb0zL/PmhyDbokGF4xRMxDipaGwPYn6VVSQ9qVAev5v/UCMoXs2My133 VMOcLxxvtlIz6OAQ== From: "thermal-bot for Jon Hunter" Sender: tip-bot2@linutronix.de Reply-to: linux-pm@vger.kernel.org To: linux-pm@vger.kernel.org Subject: [thermal: thermal/next] thermal/drivers/tegra: Fix crash when getting critical temp Cc: Jon Hunter , Daniel Lezcano , rui.zhang@intel.com, amitk@kernel.org In-Reply-To: <20221010150311.40384-1-jonathanh@nvidia.com> References: <20221010150311.40384-1-jonathanh@nvidia.com> MIME-Version: 1.0 Message-ID: <167059959082.4906.8475881283331386734.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The following commit has been merged into the thermal/next branch of thermal: Commit-ID: 340e74d08972239f8ec6ad3bed706b360162f293 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//340e74d08972239f8ec6ad3bed706b360162f293 Author: Jon Hunter AuthorDate: Mon, 10 Oct 2022 16:03:11 +01:00 Committer: Daniel Lezcano CommitterDate: Thu, 08 Dec 2022 14:30:43 +01:00 thermal/drivers/tegra: Fix crash when getting critical temp Commit 13bea86623be ("thermal/of: Remove of_thermal_get_crit_temp()") removed the function of_thermal_get_crit_temp() and this is causing a NULL pointer deference crash when attempting to call the 'get_crit_temp' function pointer because this function pointer is no longer initialised. Fix this by replacing the call to the 'get_crit_temp' function pointer with a call to the function thermal_zone_get_crit_temp() instead. Fixes: 13bea86623be ("thermal/of: Remove of_thermal_get_crit_temp()") Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20221010150311.40384-1-jonathanh@nvidia.com Signed-off-by: Daniel Lezcano --- drivers/thermal/tegra/soctherm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index d2e4549..4203e74 100644 --- a/drivers/thermal/tegra/soctherm.c +++ b/drivers/thermal/tegra/soctherm.c @@ -742,7 +742,7 @@ static int tegra_soctherm_set_hwtrips(struct device *dev, /* Get thermtrips. If missing, try to get critical trips. */ temperature = tsensor_group_thermtrip_get(ts, sg->id); if (min_low_temp == temperature) - if (tz->ops->get_crit_temp(tz, &temperature)) + if (thermal_zone_get_crit_temp(tz, &temperature)) temperature = max_high_temp; ret = thermtrip_program(dev, sg, temperature);