]> git.ipfire.org Git - thirdparty/linux.git/commit
firewire: core: code refactoring for early return at client resource allocation
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 29 Apr 2026 09:34:42 +0000 (18:34 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 29 Apr 2026 11:30:33 +0000 (20:30 +0900)
commite05a76ae1507d19d62eb0011592be9efb42e06cd
tree452ef0c1046bb112e7629a192ac527685ed9d797
parent254f49634ee16a731174d2ae34bc50bd5f45e731
firewire: core: code refactoring for early return at client resource allocation

The add_client_resource() function returns zero at success or negative
value at error. The critical section is already protected by
scoped_guard() macro. In this case, the programming pattern of early
return improves code readability.

Link: https://lore.kernel.org/r/20260429093449.160545-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
drivers/firewire/core-cdev.c