]> git.karo-electronics.de Git - karo-tx-linux.git/commit
frv: kill used but uninitialized variable
authorGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 7 Sep 2012 00:24:25 +0000 (10:24 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Sep 2012 05:36:24 +0000 (15:36 +1000)
commitea9c70a62fc222d678065459f9f40632313fab01
tree1392f7ab2414fdbb24bc6ac3e4aa70790ed6ae37
parent6e7d51959f9db8b7387f16d803fdaad6c9e5647b
frv: kill used but uninitialized variable

Commit 6afe1a1fe8ff83f6a ("PM: Remove legacy PM") removed the
initialization of retval, causing:

arch/frv/kernel/pm.c: In function 'sysctl_pm_do_suspend':
arch/frv/kernel/pm.c:165:5: warning: 'retval' may be used uninitialized in this function [-Wuninitialized]

Remove the variable completely to fix this, and convert to a proper
switch (...) { ... } construct to improve readability.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/frv/kernel/pm.c