]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
bnx2x: fix wrong return from bnx2x_trylock_hw_lock
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 27 Aug 2010 05:03:53 +0000 (22:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Aug 2010 05:03:53 +0000 (22:03 -0700)
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 <eric.dumazet@gmail.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2x/bnx2x_main.c

index 05a08d1a09f31464ce199e07038ccc85c176673e..7fb9a61a73c741d627907f2d18927e6762945e0c 100644 (file)
@@ -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)