Skip to content
Snippets Groups Projects
Commit 204dd1d3 authored by Guenter Roeck's avatar Guenter Roeck Committed by Zhang Rui
Browse files

thermal: Fix potential NULL pointer accesses


The type parameter in thermal_zone_device_register and
thermal_cooling_device_register can be NULL, indicating that no sysfs attribute
for the type should be created. Only call strlen() and strcpy() on type if it is
not NULL.

This patch addresses Coverity #102180 and #102182: Dereference before null check

Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent 1e426ffd
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment