Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
thermal/drivers/cpuidle_cooling: Fix use after error
When the function successfully finishes it logs an information about the registration of the cooling device and use its name to build the message. Unfortunately it was freed right before: drivers/thermal/cpuidle_cooling.c:218 __cpuidle_cooling_register() warn: 'name' was already freed. Fix this by freeing after the message happened. Fixes: 6fd1b18 ("thermal/drivers/cpuidle_cooling: Use device name instead of auto-numbering") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Acked-by: Viresh Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
- Loading branch information