OSDN Git Service

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)
commit4dbbf673f7d711e3f26396c43cbd391dc8f6c354
treef5a88b6d43bf7242593cfd2eb3857c173cd81c23
parentec10fd154d934cc4195da3cbd017a12817b41d51
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