Skip to content
Commit 1dd7128b authored by Yuanzheng Song's avatar Yuanzheng Song Committed by Daniel Lezcano
Browse files

thermal/core: Fix null pointer dereference in thermal_release()



If both dev_set_name() and device_register() failed, then null pointer
dereference occurs in thermal_release() which will use strncmp() to
compare the name.

So fix it by adding dev_set_name() return value check.

Signed-off-by: default avatarYuanzheng Song <songyuanzheng@huawei.com>
Link: https://lore.kernel.org/r/20211015083230.67658-1-songyuanzheng@huawei.com
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent c3131bd5
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