]> asedeno.scripts.mit.edu Git - linux.git/commit
thermal/qcom/tsens-common : fix possible object reference leak
authorPeng Hao <peng.hao2@zte.com.cn>
Wed, 13 Feb 2019 14:53:29 +0000 (22:53 +0800)
committerEduardo Valentin <edubezval@gmail.com>
Thu, 21 Feb 2019 01:23:39 +0000 (17:23 -0800)
commita245b62be3f0274114df49a8b5481be6383b314f
tree9a649d393ff30e1a914960905508ca2ae455ef4f
parent76b1ae8698d63a15000068057ccae38ec763baaa
thermal/qcom/tsens-common : fix possible object reference leak

of_find_device_by_node() takes a reference to the struct device
when it finds a match via get_device.
We also should make sure to drop the reference to the device
taken by of_find_device_by_node() when returning error.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/qcom/tsens-common.c