提交 0fdf4d09 编写于 作者: E Eric Dumazet 提交者: David S. Miller

bnx2x: fix wrong return from bnx2x_trylock_hw_lock

bnx2x_trylock_hw_lock() returns a bool :

true if succeeded to acquire the lock.
false in case of error.

-EINVAL is not an acceptable value, since its promoted to true.
Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
Acked-by: NEilon Greenstein <eilong@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 40d0802b
...@@ -781,7 +781,7 @@ static bool bnx2x_trylock_hw_lock(struct bnx2x *bp, u32 resource) ...@@ -781,7 +781,7 @@ static bool bnx2x_trylock_hw_lock(struct bnx2x *bp, u32 resource)
DP(NETIF_MSG_HW, DP(NETIF_MSG_HW,
"resource(0x%x) > HW_LOCK_MAX_RESOURCE_VALUE(0x%x)\n", "resource(0x%x) > HW_LOCK_MAX_RESOURCE_VALUE(0x%x)\n",
resource, HW_LOCK_MAX_RESOURCE_VALUE); resource, HW_LOCK_MAX_RESOURCE_VALUE);
return -EINVAL; return false;
} }
if (func <= 5) if (func <= 5)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册