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:Jiasheng Jiang <jiasheng@iscas.ac.cn> [ rjw: Subject and changelog edits ] Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Loading
Please register or sign in to comment