]> git.baikalelectronics.ru Git - kernel.git/commit
atm: eni: fix uninitialized variable warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 7 Jan 2020 20:43:59 +0000 (21:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Jan 2020 21:11:00 +0000 (13:11 -0800)
commitd6629a8d6e28ef93e5f0e7c58f91941a59e0d466
tree1e02872759c309de12d5f8de7bee6c3eb59f07c1
parent156b11c857f8451f7eda42a007f92935c015d325
atm: eni: fix uninitialized variable warning

With -O3, gcc has found an actual unintialized variable stored
into an mmio register in two instances:

drivers/atm/eni.c: In function 'discard':
drivers/atm/eni.c:465:13: error: 'dma[1]' is used uninitialized in this function [-Werror=uninitialized]
   writel(dma[i*2+1],eni_dev->rx_dma+dma_wr*8+4);
             ^
drivers/atm/eni.c:465:13: error: 'dma[3]' is used uninitialized in this function [-Werror=uninitialized]

Change the code to always write zeroes instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/atm/eni.c