[PATCH 1/2] taskstats: drop the dead NULL attribute check in parse()
From: Bradley Morgan
Date: Tue Jul 28 2026 - 16:23:20 EST
taskstats_user_cmd() only calls the cpumask handlers after checking the
same info->attrs[] entry, so parse() never sees a NULL attribute. Drop the
check and its odd "return 1", which no caller tested for anyway.
No functional change.
Signed-off-by: Bradley Morgan <include@xxxxxxxxx>
---
kernel/taskstats.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index bca91c394793..e7f8e1b5d1bc 100644
--- a/kernel/taskstats.c
+++ b/kernel/taskstats.c
@@ -361,8 +361,6 @@ static int parse(struct nlattr *na, struct cpumask *mask)
int len;
int ret;
- if (na == NULL)
- return 1;
len = nla_len(na);
if (len > TASKSTATS_CPUMASK_MAXLEN)
return -E2BIG;
--
2.47.3