>> Add two labels so that a bit of exception handling can be better reused
>> at the end of this function implementation.
The implementation of the function “snd_cs8427_qsubcode_get” was identified
as another update candidate.
https://elixir.bootlin.com/linux/v6.11/source/sound/i2c/cs8427.c#L385
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/sound/i2c/cs8427.c?h=v6.11
> The double goto jumps aren't nice, either.
Would you like to care to avoid a bit of duplicate code from repeated
return statements?
https://wiki.sei.cmu.edu/confluence/display/c/MEM12-C.+Consider+using+a+goto+chain+when+leaving+a+function+on+error+when+using+and+releasing+resources
> I guess we can do clean up better with cleanup.h stuff.
Scope-based resource management can eventually be applied also for
snd_i2c_unlock() calls.
https://elixir.bootlin.com/linux/v6.11/source/include/sound/i2c.h#L76
How do you think about to clarify any software extensions accordingly?
Regards,
Markus
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]