From 36ffbe1d5e99ebe17bea60e65e053dbcd89bc04c Mon Sep 17 00:00:00 2001 From: Bradley Morgan Date: Tue, 28 Jul 2026 20:21:03 +0000 Subject: 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 Cc: Balbir Singh Signed-off-by: Andrew Morton --- kernel/taskstats.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'kernel') 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; -- cgit v1.2.3