summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtul Kumar Pant <atulpant.linux@gmail.com>2023-08-16 02:16:44 +0530
committerPaul Moore <paul@paul-moore.com>2023-08-15 18:10:56 -0400
commit22cde1012f6a6509656f976cbe3aa5f4c5d0f1a3 (patch)
tree46a46778447beb3309642801fb000705d64f5cab
parent62acadda115a94bffd1f6b36acbb67e3f04811be (diff)
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: Atul Kumar Pant <atulpant.linux@gmail.com> [PM: subject line tweaks] Signed-off-by: Paul Moore <paul@paul-moore.com>
-rw-r--r--kernel/auditsc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index e89d397f2148..b0cb7631e48b 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -880,7 +880,8 @@ static void audit_filter_syscall(struct task_struct *tsk,
*/
static int audit_filter_inode_name(struct task_struct *tsk,
struct audit_names *n,
- struct audit_context *ctx) {
+ struct audit_context *ctx)
+{
int h = audit_hash_ino((u32)n->ino);
struct list_head *list = &audit_inode_hash[h];
@@ -1064,7 +1065,8 @@ int audit_alloc(struct task_struct *tsk)
return 0;
}
- if (!(context = audit_alloc_context(state))) {
+ context = audit_alloc_context(state);
+ if (!context) {
kfree(key);
audit_log_lost("out of memory in audit_alloc");
return -ENOMEM;