ALSA: mips: avoid potential uninitialized variable use
authorArnd Bergmann <arnd@arndb.de>
Mon, 16 Jan 2017 13:27:57 +0000 (14:27 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 16 Jan 2017 13:33:42 +0000 (14:33 +0100)
commit8b169cb27c8267cd344fd71c2067ea864dd4c2e7
tree670194069d4dc46c631186fde50cbc70bf238f59
parenta535ad57d0e6b959cd79914a1127caade36a9459
ALSA: mips: avoid potential uninitialized variable use

MIPS allmodconfig results in this warning:

sound/mips/hal2.c: In function 'hal2_gain_get':
sound/mips/hal2.c:224:35: error: 'r' may be used uninitialized in this function [-Werror=maybe-uninitialized]
sound/mips/hal2.c:223:35: error: 'l' may be used uninitialized in this function [-Werror=maybe-uninitialized]
sound/mips/hal2.c: In function 'hal2_gain_put':
sound/mips/hal2.c:260:13: error: 'new' may be used uninitialized in this function [-Werror=maybe-uninitialized]
sound/mips/hal2.c:260:13: error: 'old' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Returning an error for all unexpected cases shuts up the warning

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/mips/hal2.c