Skip to content
Commit adc8749b authored by Yue Hu's avatar Yue Hu Committed by Zhang Rui
Browse files

thermal/drivers/core: Use put_device() if device_register() fails



Never directly free @dev after calling device_register(), even if it
returned an error! Always use put_device() to give up the reference
initialized. Clean up the rollback block also.

Signed-off-by: default avatarYue Hu <huyue2@yulong.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 8c7aa184
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment