]> git.ipfire.org Git - thirdparty/linux.git/commit - kernel/audit_watch.c
audit: simplify audit_enabled check in audit_watch_log_rule_change()
authorRichard Guy Briggs <rgb@redhat.com>
Thu, 14 Jun 2018 20:20:06 +0000 (16:20 -0400)
committerPaul Moore <paul@paul-moore.com>
Thu, 28 Jun 2018 15:44:31 +0000 (11:44 -0400)
commit4fa7f086993594e79f456a04656da2fcb5691209
tree8041b614bc85127efabd737a2dbe285e273c6f6b
parent65a8766f5f50a5cd342f3d8f77a30917648ddb67
audit: simplify audit_enabled check in audit_watch_log_rule_change()

Check the audit_enabled flag and bail immediately.  This does not change
the functionality, but brings the code format in line with similar
checks in audit_tree_log_remove_rule(), audit_mark_log_rule_change(),
and elsewhere in the audit code.

See: https://github.com/linux-audit/audit-kernel/issues/50

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
[PM: tweaked subject line]
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/audit_watch.c