]> git.baikalelectronics.ru Git - kernel.git/commit
dpaa_eth: avoid uninitialized variable false-positive warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 3 Nov 2017 12:52:24 +0000 (13:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Nov 2017 13:13:00 +0000 (22:13 +0900)
commit9885dde08d54e5536da6c0feb44fb73d39d8153f
tree7c6bbad4b292f4b09056d2696e99074629d61c69
parent6f9c319fd9761f0f48f710e37339d07e7af00156
dpaa_eth: avoid uninitialized variable false-positive warning

We can now build this driver on ARM, so I ran into a randconfig build
warning that presumably had existed on powerpc already.

drivers/net/ethernet/freescale/dpaa/dpaa_eth.c: In function 'sg_fd_to_skb':
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:1712:18: error: 'skb' may be used uninitialized in this function [-Werror=maybe-uninitialized]

I'm slightly changing the logic here, to make it obvious to the
compiler that 'skb' is always initialized.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c