]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
frv: kill used but uninitialized variable
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 13 Sep 2012 01:01:02 +0000 (11:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Sep 2012 07:28:04 +0000 (17:28 +1000)
commit182ab88cc40b3df966bf30a62f198cf786fcc977
tree450befe86e020ccd9452f57af480d621db9ba9cf
parentfe754d3fa61658acc8d5628be4fc6a7ade8f880e
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