From: Eric Dumazet Date: Fri, 27 Aug 2010 05:03:53 +0000 (-0700) Subject: bnx2x: fix wrong return from bnx2x_trylock_hw_lock X-Git-Tag: v2.6.37-rc1~147^2~646 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0fdf4d096102464e290d5ccaee8ad0cee7bd9e8a;p=platform%2Fkernel%2Flinux-exynos.git 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: Eric Dumazet Acked-by: Eilon Greenstein Signed-off-by: David S. Miller --- diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index 05a08d1..7fb9a61 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c @@ -781,7 +781,7 @@ static bool bnx2x_trylock_hw_lock(struct bnx2x *bp, u32 resource) DP(NETIF_MSG_HW, "resource(0x%x) > HW_LOCK_MAX_RESOURCE_VALUE(0x%x)\n", resource, HW_LOCK_MAX_RESOURCE_VALUE); - return -EINVAL; + return false; } if (func <= 5)