]> git.baikalelectronics.ru Git - kernel.git/commit
nfc: llcp: use centralized exiting of bind on errors
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Wed, 2 Mar 2022 19:25:20 +0000 (20:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Mar 2022 10:43:37 +0000 (10:43 +0000)
commit5238426baac0f8272889e714dbde7ca631cbd308
treef5a88b6d43bf7242593cfd2eb3857c173cd81c23
parentb6571c78d1b5408d29012496dc5e0a1ff5b80e17
nfc: llcp: use centralized exiting of bind on errors

Coding style encourages centralized exiting of functions, so rewrite
llcp_sock_bind() error paths to use such pattern.  This reduces the
duplicated cleanup code, make success path visually shorter and also
cleans up the errors in proper order (in reversed way from
initialization).

No functional impact expected.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/nfc/llcp_sock.c