Skip to content

Commit

Permalink
mac802154: llsec: fold useless return value check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Phoebe Buckheister authored and David S. Miller committed May 22, 2014
1 parent 6f3eabc commit 62e9c11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac802154/llsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ int mac802154_llsec_encrypt(struct mac802154_llsec *sec, struct sk_buff *skb)
rc = llsec_do_encrypt(skb, sec, &hdr, key);
llsec_key_put(key);

return rc < 0 ? rc : 0;
return rc;

fail_read:
read_unlock_bh(&sec->lock);
Expand Down

0 comments on commit 62e9c11

Please sign in to comment.