]> git.karo-electronics.de Git - karo-tx-linux.git/commit
frv: kill used but uninitialized variable
authorGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 28 Sep 2012 00:20:10 +0000 (10:20 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Sep 2012 06:08:00 +0000 (16:08 +1000)
commit82f17a183a44783e21174ba0577a815715d0108b
tree08972e05ba2a9c93fc5c80bd9856bab31b27fdca
parent04d378bbf7d3ab395c1273ba4c73fa116f659c24
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