soc: imx8m: Unregister cpufreq and soc dev in cleanup path
authorPeng Fan <peng.fan@nxp.com>
Fri, 14 Feb 2025 08:47:51 +0000 (16:47 +0800)
committerShawn Guo <shawnguo@kernel.org>
Sun, 23 Feb 2025 07:56:10 +0000 (15:56 +0800)
commitcf7139aac463880cbd5c5e999c118fbe91631411
treebec5ebdd18ae085f7967d6262fb0360c4d5a7b0f
parent83964a29379cb08929a39172780a4c2992bc7c93
soc: imx8m: Unregister cpufreq and soc dev in cleanup path

Unregister the cpufreq device and soc device when resource unwinding,
otherwise there will be warning when do removing test:
sysfs: cannot create duplicate filename '/devices/platform/imx-cpufreq-dt'
CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.13.0-rc1-next-20241204
Hardware name: NXP i.MX8MPlus EVK board (DT)

Fixes: 9cc832d37799 ("soc: imx8m: Probe the SoC driver as platform driver")
Cc: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/soc/imx/soc-imx8m.c