diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-03-23 16:15:55 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-08 10:14:20 +0200 |
commit | 2b2bfb537be44253eb9d2dc9a0f959fdc3102427 (patch) | |
tree | 3d5406758e5df45d24806bfd510fb2ad5d8fe603 /drivers/zorro | |
parent | d32ee7026081bc43313dc8f7aac8bbf93206e6a5 (diff) |
ALSA: au88x0: avoid theoretical uninitialized access
commit 13f99ebdd602ebdafb909e15ec6ffb1e34690167 upstream.
The latest gcc-7.0.1 snapshot points out that we if nr_ch is zero, we never
initialize some variables:
sound/pci/au88x0/au88x0_core.c: In function 'vortex_adb_allocroute':
sound/pci/au88x0/au88x0_core.c:2304:68: error: 'mix[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
sound/pci/au88x0/au88x0_core.c:2305:58: error: 'src[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
I assume this can never happen in practice, but adding a check here doesn't
hurt either and avoids the warning. The code has been unchanged since
the start of git history.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/zorro')
0 files changed, 0 insertions, 0 deletions