]> 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)
commitee987e1c010079d6ce83ba762e34f7f8accf092b
treebccc0d440b8b99c8ece4a973b593a2aed173d8d7
parent8026d5073caa59a81b6d53aecc0a1b9f85fa7d76
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