summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBradley Morgan <include@grrlz.net>2026-07-28 20:21:03 +0000
committerAndrew Morton <akpm@linux-foundation.org>2026-08-13 15:42:05 -0700
commit36ffbe1d5e99ebe17bea60e65e053dbcd89bc04c (patch)
treed9e0c06b62060618df3f8839b29f9247f556726b
parent1a1b9b027049683f56aa66f854b982d7a4b82226 (diff)
downloadlinux-36ffbe1d5e99ebe17bea60e65e053dbcd89bc04c.tar.gz
linux-36ffbe1d5e99ebe17bea60e65e053dbcd89bc04c.zip
taskstats: drop the dead NULL attribute check in parse()
Patch series "taskstats: tidy up the cpumask command path". Two small cleanups from reading kernel/taskstats.c. No functional change in either one. This patch (of 2): 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. Link: https://lore.kernel.org/20260728202104.17839-1-include@grrlz.net Link: https://lore.kernel.org/20260728202104.17839-2-include@grrlz.net Signed-off-by: Bradley Morgan <include@grrlz.net> Cc: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--kernel/taskstats.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index 74f89b632c0a..7af47511152d 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;