• Arnd Bergmann's avatar
    ALSA: mips: avoid potential uninitialized variable use · 8b169cb2
    Arnd Bergmann authored
    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: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    8b169cb2
hal2.c 25 KB