> In nouveau_hwmon_init(), if hwmon_device_register_with_info() fails,
> the allocated hwmon structure is leaked because the function returns
> the error code directly.
> 
> Fix this by freeing the allocated memory and clearing the pointer on
> the error path.
> 
> Fixes: b9ed919f1c8f ("drm/nouveau/drm/pm: remove everything except the hwmon 
> interfaces to THERM")
> Cc: [email protected]
> Reviewed-by: Lyude Paul <[email protected]>
> Signed-off-by: liupeng <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=2

Reply via email to