History

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.

Bradley Morgan committed 3 months ago

Commit 36ffbe11 parent 1a1b9b01 file · +0 −2Browse files

Unified · Split

kernel/taskstats.c+0−2
@@ -361,8 +361,6 @@ static int parse(struct nlattr *na, struct cpumask *mask) · 360 unmodified lines
361361 int len;
362362 int ret;
363363
364− if (na == NULL)
365− return 1;
366364 len = nla_len(na);
367365 if (len > TASKSTATS_CPUMASK_MAXLEN)
368366 return -E2BIG;