aboutsummaryrefslogtreecommitdiff
path: root/include/linux/overflow.h
diff options
context:
space:
mode:
authorJiasheng Jiang <[email protected]>2022-01-26 09:48:53 +0800
committerRafael J. Wysocki <[email protected]>2022-02-04 18:55:43 +0100
commit38b16d6cfe54c820848bcfc999bc5e8a7da1cefb (patch)
treeb8f929837477c72fe027a6ced6bae1867a6bdd51 /include/linux/overflow.h
parent26291c54e111ff6ba87a164d85d4a4e134b7315c (diff)
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: 0ba13c763aac ("thermal/int340x_thermal: Export GDDV") Signed-off-by: Jiasheng Jiang <[email protected]> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'include/linux/overflow.h')
0 files changed, 0 insertions, 0 deletions