Skip to content
Commit 38b16d6c authored by 蒋家盛's avatar 蒋家盛 Committed by Rafael J. Wysocki
Browse files

thermal: int340x: Check for NULL after calling kmemdup()



As the potential failure of the allocation, kmemdup() may return NULL.

Then, 'bin_attr_data_vault.private' will be NULL, but
'bin_attr_data_vault.size' is not 0, which is not consistent.

Therefore, it is better to check the return value of kmemdup() to
avoid the confusion.

Fixes: 0ba13c76 ("thermal/int340x_thermal: Export GDDV")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
[ rjw: Subject and changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 26291c54
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment