diff options
| author | Thomas Bourgoin <[email protected]> | 2023-12-15 12:17:24 +0100 |
|---|---|---|
| committer | Herbert Xu <[email protected]> | 2023-12-22 12:30:19 +0800 |
| commit | 0eaef675b94c746900dcea7f6c41b9a103ed5d53 (patch) | |
| tree | a834176c87c393ea77196ffea78b3a603d1a0cb8 /tools/perf/scripts/python | |
| parent | fcf60f4bcf54952cc14d14178c358be222dbeb43 (diff) | |
crypto: stm32/crc32 - fix parsing list of devices
smatch warnings:
drivers/crypto/stm32/stm32-crc32.c:108 stm32_crc_get_next_crc() warn:
can 'crc' even be NULL?
Use list_first_entry_or_null instead of list_first_entry to retrieve
the first device registered.
The function list_first_entry always return a non NULL pointer even if
the list is empty. Hence checking if the pointer returned is NULL does
not tell if the list is empty or not.
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Signed-off-by: Thomas Bourgoin <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions