]> Git Repo - linux.git/commitdiff
rv: Remove redundant assignment to variable retval
authorColin Ian King <[email protected]>
Tue, 18 Apr 2023 15:00:18 +0000 (16:00 +0100)
committerSteven Rostedt (Google) <[email protected]>
Tue, 25 Apr 2023 23:24:28 +0000 (19:24 -0400)
Variable retval is being assigned a value that is never read, it is
being re-assigned a new value in both paths of a following if statement.
Remove the assignment.

Cleans up clang-scan warning:
kernel/trace/rv/rv.c:293:2: warning: Value stored to 'retval' is never read [deadcode.DeadStores]
        retval = count;

Link: https://lkml.kernel.org/r/[email protected]
Cc: Masami Hiramatsu <[email protected]>
Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Daniel Bristot de Oliveira <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
kernel/trace/rv/rv.c

index 7e9061828c240ad4851ef46a5d9cbd95bd348924..2f68e93fff0bc93691de3409f6f168c6c8d5b827 100644 (file)
@@ -290,8 +290,6 @@ static ssize_t monitor_enable_write_data(struct file *filp, const char __user *u
        if (retval)
                return retval;
 
-       retval = count;
-
        mutex_lock(&rv_interface_lock);
 
        if (val)
This page took 0.056162 seconds and 4 git commands to generate.