Commit 84117994 authored by Minghao Chi's avatar Minghao Chi Committed by John Johansen
Browse files

security/apparmor: remove redundant ret variable



Return value from nf_register_net_hooks() directly instead
of taking this in another redundant variable.

Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: default avatarCGEL ZTE <cgel.zte@gmail.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent 68ff8540
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1825,11 +1825,8 @@ static const struct nf_hook_ops apparmor_nf_ops[] = {

static int __net_init apparmor_nf_register(struct net *net)
{
	int ret;

	ret = nf_register_net_hooks(net, apparmor_nf_ops,
	return nf_register_net_hooks(net, apparmor_nf_ops,
				    ARRAY_SIZE(apparmor_nf_ops));
	return ret;
}

static void __net_exit apparmor_nf_unregister(struct net *net)