Smack: Remove unnecessary variable initialization
authorCasey Schaufler <casey@schaufler-ca.com>
Mon, 5 Oct 2020 21:20:51 +0000 (14:20 -0700)
committerCasey Schaufler <casey@schaufler-ca.com>
Mon, 5 Oct 2020 21:20:51 +0000 (14:20 -0700)
The initialization of rc in smack_from_netlbl() is pointless.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
security/smack/smack_lsm.c

index aa60a9468734f533e4c28c7da8cdf93d46659ebd..db2d455b80a801f9a6c85904979a2c93ff64643d 100644 (file)
@@ -3870,7 +3870,7 @@ static struct smack_known *smack_from_netlbl(struct sock *sk, u16 family,
        struct netlbl_lsm_secattr secattr;
        struct socket_smack *ssp = NULL;
        struct smack_known *skp = NULL;
-       int rc = 0;
+       int rc;
 
        netlbl_secattr_init(&secattr);