Commit e49a1e1
thermal/core: fix error code in __thermal_cooling_device_register()
Return an error pointer if ->get_max_state() fails. The current code
returns NULL which will cause an oops in the callers.
Fixes: c408b3d ("thermal: Validate new state in cur_state_store()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>1 parent a365105 commit e49a1e1
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
896 | 896 | | |
897 | 897 | | |
898 | 898 | | |
899 | | - | |
| 899 | + | |
| 900 | + | |
900 | 901 | | |
901 | 902 | | |
902 | 903 | | |
| |||
0 commit comments