bnx2x: fix resource allocattion error handling
authorCharles (Chas) Williams <ciwillia@brocade.com>
Thu, 31 Dec 2015 00:37:50 +0000 (19:37 -0500)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 16 Mar 2016 15:50:23 +0000 (16:50 +0100)
commit31ec57cb6b1e478e8426244098b2b17e22ff221a
treed4d33231356f9943820536c7ff20bb1e32ae2933
parent52be0607bf5a76b871722885960314f2623ed125
bnx2x: fix resource allocattion error handling

bnx2x_loop_obtain_resources() returns a struct containing the status and
the error message.  If bnx2x_do_req4pf() fails, it shouldn't return both
of these fields set to 0 indicating failure and no error.

Further, bnx2x_do_req4pf() needs to be able fail and return NO_RESOURCES
so that bnx2x_loop_obtain_resources() can negotiate reduced resource
requirments.  This requires additional checking around bnx2x_do_req4pf().

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Chas Williams <3chas3@gmail.com>
Acked-by: Rasesh Mody <rasesh.mody@qlogic.com>
drivers/net/bnx2x/bnx2x_vfpf.c