mac802154: llsec: fold useless return value check
authorPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Tue, 20 May 2014 11:14:23 +0000 (13:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 May 2014 19:24:13 +0000 (15:24 -0400)
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>
net/mac802154/llsec.c

index 6edcb20c2e708295486408d6c44281d830ab5eb7..08d08cbf51f4bc355d7d2fa32f9f50fb8da36ed4 100644 (file)
@@ -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);