]> git.baikalelectronics.ru Git - kernel.git/commit
thermal/drivers/imx_sc_thermal: Fix the loop condition
authorViorel Suman <viorel.suman@nxp.com>
Tue, 17 Jan 2023 09:19:55 +0000 (11:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:32:55 +0000 (09:32 +0100)
commitd137ea1115fa7ea00d227d0d874b18a49f1b5614
tree08f04183c4c35ceaae067d16c7736b1fbcd3a6cd
parent6ebdcc9d0563b27f441fda517769db08e62dc9ce
thermal/drivers/imx_sc_thermal: Fix the loop condition

[ Upstream commit 6bf433ca717395184d00e18ac7cdc0e320f2b9b8 ]

The minimal resource ID is 0: IMX_SC_R_AP_0=0, so fix
the loop condition. Aside of this - constify the array.

Fixes: 8c1aca1e8561 ("thermal/drivers/imx_sc: Rely on the platform data to get the resource id")
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Dong Aisheng <Aisheng.dong@nxp.com>
Link: https://lore.kernel.org/r/20230117091956.61729-1-viorel.suman@oss.nxp.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/imx_sc_thermal.c