Commit 22cde101 authored by Atul Kumar Pant's avatar Atul Kumar Pant Committed by Paul Moore

audit: cleanup function braces and assignment-in-if-condition

The patch fixes following checkpatch.pl issue:
ERROR: open brace '{' following function definitions go on the next line
ERROR: do not use assignment in if condition
Signed-off-by: default avatarAtul Kumar Pant <atulpant.linux@gmail.com>
[PM: subject line tweaks]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 62acadda
...@@ -880,7 +880,8 @@ static void audit_filter_syscall(struct task_struct *tsk, ...@@ -880,7 +880,8 @@ static void audit_filter_syscall(struct task_struct *tsk,
*/ */
static int audit_filter_inode_name(struct task_struct *tsk, static int audit_filter_inode_name(struct task_struct *tsk,
struct audit_names *n, struct audit_names *n,
struct audit_context *ctx) { struct audit_context *ctx)
{
int h = audit_hash_ino((u32)n->ino); int h = audit_hash_ino((u32)n->ino);
struct list_head *list = &audit_inode_hash[h]; struct list_head *list = &audit_inode_hash[h];
...@@ -1064,7 +1065,8 @@ int audit_alloc(struct task_struct *tsk) ...@@ -1064,7 +1065,8 @@ int audit_alloc(struct task_struct *tsk)
return 0; return 0;
} }
if (!(context = audit_alloc_context(state))) { context = audit_alloc_context(state);
if (!context) {
kfree(key); kfree(key);
audit_log_lost("out of memory in audit_alloc"); audit_log_lost("out of memory in audit_alloc");
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment