]> git.baikalelectronics.ru Git - kernel.git/commit
net: atheros: atl2: don't return zero on failure path in atl2_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 19 May 2017 22:52:11 +0000 (01:52 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 May 2017 16:05:01 +0000 (12:05 -0400)
commita8ed97e2db9b9fb6553cd9580cda2b732ee997ed
treebccc0d440b8b99c8ece4a973b593a2aed173d8d7
parent41000998b278f9e987c234ca96b3215a8b926870
net: atheros: atl2: don't return zero on failure path in atl2_probe()

If dma mask checks fail in atl2_probe(), it breaks off initialization,
deallocates all resources, but returns zero.

The patch adds proper error code return value and
make error code setup unified.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/atheros/atlx/atl2.c