]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/pseries: Don't needlessly initialise rv to 0
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 24 Jul 2017 11:46:03 +0000 (21:46 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 24 Jul 2017 11:46:03 +0000 (21:46 +1000)
All cases initialise rv, and if they didn't that would be a bug. By
dropping the initialisation we give the compiler the chance to catch
those bugs for us.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/pseries/reconfig.c

index 431f513586a98e4fffd89ae644774b0f06d9328b..e6bfff8a20a44f812c5b762577f4b528714b80aa 100644 (file)
@@ -363,7 +363,7 @@ static int do_update_property(char *buf, size_t bufsize)
 static ssize_t ofdt_write(struct file *file, const char __user *buf, size_t count,
                          loff_t *off)
 {
-       int rv = 0;
+       int rv;
        char *kbuf;
        char *tmp;