diff options
| author | 2026-06-14 18:43:28 +0300 | |
|---|---|---|
| committer | 2026-07-07 11:18:52 +0200 | |
| commit | d1314cadc296eef9b60cb5867c4be5775173f651 (patch) | |
| tree | 5a00834936b827d08358d071c115748dcc4f829a /scripts/Makefile.thinlto | |
| parent | staging: greybus: remove unused macro CAP_TIMEOUT_MS (diff) | |
staging: greybus: audio_codec: fix sscanf return value check
Smatch static checker warns:
drivers/staging/greybus/audio_codec.c:335 gbaudio_module_update()
warn: sscanf doesn't return error codes
The sscanf() function returns the number of successfully matched input
items, not a negative error code. Compare the return value directly
with the expected number of conversions (3) instead of storing it in
'ret' and returning it as an error code, which leads to returning
a positive value on failure.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Closes: https://lore.kernel.org/all/YoOLnDkHgVltyXK7@kili/
Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
Link: https://patch.msgid.link/20260614154329.5176-2-abdelnasserhussein11@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
