mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] thermal/drivers/hisi: Drop second sensor hi3660
@ 2023-02-10 14:15 Yongqin Liu
  2023-02-10 14:28 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Yongqin Liu @ 2023-02-10 14:15 UTC (permalink / raw)
  To: rafael, daniel.lezcano, amitk, rui.zhang, edubezval, linux-pm,
	linux-kernel
  Cc: keescook, sumit.semwal, jstultz

The commit 74c8e6bffbe1 ("driver core: Add __alloc_size hint to devm
allocators") exposes a panic "BRK handler: Fatal exception" on the
hi3660_thermal_probe funciton.
This is because the function allocates memory for only one
sensors array entry, but tries to fill up a second one.

Fix this by removing the unneeded second access.

Fixes: 7d3a2a2bbadb ("thermal/drivers/hisi: Fix number of sensors on hi3660")
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Link: https://lore.kernel.org/linux-mm/20221101223321.1326815-5-keescook@chromium.org/
---
 drivers/thermal/hisi_thermal.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
index d6974db7aaf7..15af90f5c7d9 100644
--- a/drivers/thermal/hisi_thermal.c
+++ b/drivers/thermal/hisi_thermal.c
@@ -427,10 +427,6 @@ static int hi3660_thermal_probe(struct hisi_thermal_data *data)
 	data->sensor[0].irq_name = "tsensor_a73";
 	data->sensor[0].data = data;
 
-	data->sensor[1].id = HI3660_LITTLE_SENSOR;
-	data->sensor[1].irq_name = "tsensor_a53";
-	data->sensor[1].data = data;
-
 	return 0;
 }
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] thermal/drivers/hisi: Drop second sensor hi3660
  2023-02-10 14:15 [PATCH 1/1] thermal/drivers/hisi: Drop second sensor hi3660 Yongqin Liu
@ 2023-02-10 14:28 ` Daniel Lezcano
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2023-02-10 14:28 UTC (permalink / raw)
  To: Yongqin Liu, rafael, amitk, rui.zhang, edubezval, linux-pm, linux-kernel
  Cc: keescook, sumit.semwal, jstultz

On 10/02/2023 15:15, Yongqin Liu wrote:
> The commit 74c8e6bffbe1 ("driver core: Add __alloc_size hint to devm
> allocators") exposes a panic "BRK handler: Fatal exception" on the
> hi3660_thermal_probe funciton.
> This is because the function allocates memory for only one
> sensors array entry, but tries to fill up a second one.
> 
> Fix this by removing the unneeded second access.
> 
> Fixes: 7d3a2a2bbadb ("thermal/drivers/hisi: Fix number of sensors on hi3660")
> Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
> Link: https://lore.kernel.org/linux-mm/20221101223321.1326815-5-keescook@chromium.org/
> ---

Applied, thanks


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-10 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-10 14:15 [PATCH 1/1] thermal/drivers/hisi: Drop second sensor hi3660 Yongqin Liu
2023-02-10 14:28 ` Daniel Lezcano

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®