diff options
| author | Rong Zhang <i@rong.moe> | 2026-04-14 21:29:01 +0800 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-04-15 14:28:01 +0200 |
| commit | 37a6b2d67b0a08e5c3d2156c9178c158c3c0225f (patch) | |
| tree | 2333f668ae648372b2ad1e3faca891c87a5fdccb /include/linux/timerqueue.h | |
| parent | 02df59d0258cd97cc60b49e5570ebfcc95ea6030 (diff) | |
ALSA: usb-audio: Tidy up error check for processing unit
There are two duplicated code paths calling get_min_max() with the same
arguments in build_audio_procunit(). This once led to a failure to
notice a code path that caused the `err' variable uninitialized when
adding error checks for callers of get_min_max*() [1].
Move cases in the switch-case statement to tidy up the error check by
merging the duplicated code paths together with a fallthrough attribute.
This also eliminates the `err = 0' lines and aggregates the error check
along with the corresponding call together, so that the intent of these
code paths is clearer.
The refactor also has an interesting effect that shrinks the .text size
by 16 bytes (GCC 15 amd64). It seems that the compiler was unable to
perform dead code elimination for the `err = 0' paths before.
Link: https://lore.kernel.org/r/ad36dGpCBTGsyFr_@stanley.mountain/ [1]
Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20260414-uac-build_auto_procunit-refactor-v1-1-afeb7efa6518@rong.moe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
