You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
powercap: fix possible name leak in powercap_register_zone()
In the error path after calling dev_set_name(), the device
name is leaked. To fix this, calling dev_set_name() before
device_register(), and call put_device() if it returns error.
All the resources is released in powercap_release(), so it
can return from powercap_register_zone() directly.
Fixes: 75d2364 ("PowerCap: Add class driver")
Signed-off-by: Yang Yingliang <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
0 commit comments