mm/process_vm_access: remove redundant initialization of iov_r
authorColin Ian King <colin.king@canonical.com>
Tue, 15 Dec 2020 03:14:25 +0000 (19:14 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2020 20:13:46 +0000 (12:13 -0800)
The pointer iov_r is being initialized with a value that is never read and
it is being updated later with a new value.  The initialization is
redundant and can be removed.

Link: https://lkml.kernel.org/r/20201102120614.694917-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/process_vm_access.c

index 702250f..4bcc119 100644 (file)
@@ -260,7 +260,7 @@ static ssize_t process_vm_rw(pid_t pid,
        struct iovec iovstack_l[UIO_FASTIOV];
        struct iovec iovstack_r[UIO_FASTIOV];
        struct iovec *iov_l = iovstack_l;
-       struct iovec *iov_r = iovstack_r;
+       struct iovec *iov_r;
        struct iov_iter iter;
        ssize_t rc;
        int dir = vm_write ? WRITE : READ;