]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tools/mm/slabinfo: remove dead assignment in get_obj_and_str()
authorXuewen Wang <wangxuewen@kylinos.cn>
Mon, 18 May 2026 06:21:58 +0000 (14:21 +0800)
committerVlastimil Babka (SUSE) <vbabka@kernel.org>
Fri, 29 May 2026 09:49:15 +0000 (11:49 +0200)
The assignment `x = NULL` sets the local parameter variable instead of
`*x`, which is a no-op since `*x` was already set to NULL on the line
above. Remove the dead assignment.

Signed-off-by: Xuewen Wang <wangxuewen@kylinos.cn>
Reviewed-by: SeongJae Park <sj@kernel.org>
Link: https://patch.msgid.link/20260518062159.80664-3-wangxuewen@kylinos.cn
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
tools/mm/slabinfo.c

index 39f7eae7eecdac99942ae1129d7363f965a8165a..685bcdd03568ea6b4eb10dc0ee26c6c94cb9ce70 100644 (file)
@@ -193,10 +193,9 @@ static unsigned long get_obj_and_str(const char *name, char **x)
 
        *x = NULL;
 
-       if (!read_obj(name)) {
-               x = NULL;
+       if (!read_obj(name))
                return 0;
-       }
+
        result = strtoul(buffer, &p, 10);
        while (*p == ' ')
                p++;