mac802154: llsec: fold useless return value check
llsec_do_encrypt will never return a positive value, so the restriction to 0-or-negative on return is useless. Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6f3eabcd04
commit
62e9c117ee
@ -773,7 +773,7 @@ int mac802154_llsec_encrypt(struct mac802154_llsec *sec, struct sk_buff *skb)
|
|||||||
rc = llsec_do_encrypt(skb, sec, &hdr, key);
|
rc = llsec_do_encrypt(skb, sec, &hdr, key);
|
||||||
llsec_key_put(key);
|
llsec_key_put(key);
|
||||||
|
|
||||||
return rc < 0 ? rc : 0;
|
return rc;
|
||||||
|
|
||||||
fail_read:
|
fail_read:
|
||||||
read_unlock_bh(&sec->lock);
|
read_unlock_bh(&sec->lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user