atm: eni: fix uninitialized variable warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 7 Jan 2020 20:43:59 +0000 (21:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Feb 2020 09:37:09 +0000 (09:37 +0000)
commit284cd2ab3c358dbcec1332eba11640741e3d8058
tree420a9902f7a885fe598508671b45861213ab8854
parent4fce6b14f29d469bdfe9540ea8ad6c4c7a4a318c
atm: eni: fix uninitialized variable warning

[ Upstream commit 30780d086a83332adcd9362281201cee7c3d9d19 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/atm/eni.c