]> git.karo-electronics.de Git - karo-tx-linux.git/commit
frv: kill used but uninitialized variable
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sat, 21 Jul 2012 00:54:35 +0000 (10:54 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 3 Aug 2012 03:24:53 +0000 (13:24 +1000)
commit0812ac22a53549919198a1919e4faab6af950e02
tree396f3ff336f95d26a825ee008b73186b20b046b8
parentf4693c4151e0239192c20058821cfcfeae5c1f26
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