Skip to content

Commit

Permalink
security/apparmor: remove redundant ret variable
Browse files Browse the repository at this point in the history
Return value from nf_register_net_hooks() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Minghao Chi <[email protected]>
Signed-off-by: CGEL ZTE <[email protected]>
Signed-off-by: John Johansen <[email protected]>
  • Loading branch information
Minghao Chi authored and John Johansen committed Jul 9, 2022
1 parent 68ff854 commit 8411799
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions security/apparmor/lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8411799

Please sign in to comment.