]> git.karo-electronics.de Git - karo-tx-linux.git/commit
frv: kill used but uninitialized variable
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 14 Aug 2012 03:22:38 +0000 (13:22 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 6 Sep 2012 06:14:25 +0000 (16:14 +1000)
commit1462607558647078ed9917c62c628aae85a4113b
treeabe2715d30eac5a1a205f0b021b1a96644e42fa1
parent310192460a554be828ff385e98f0dfb16ed086a3
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