p54pci: don't return zero on failure paths in p54p_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Wed, 2 Jan 2013 20:06:47 +0000 (00:06 +0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Jan 2013 20:16:59 +0000 (15:16 -0500)
commit6960af6dce1f0b2d9d1b4ddf75952d54e633b923
tree0ba3d4a06fdd882d1e327ad49c5e1860b601d6de
parent40a23296854dded596fda33e0df4a7373229d75e
p54pci: don't return zero on failure paths in p54p_probe()

If pci_set_dma_mask() or pci_set_consistent_dma_mask() fails in p54p_probe(),
it breaks off initialization, deallocates all resources, but returns zero.
Similar issue is if check for returned value of pci_resource_len() fails.

The patch implements proper error code propagation.

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

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/p54/p54pci.c