From: Dan Carpenter Date: Mon, 20 Dec 2010 21:04:02 +0000 (+0000) Subject: bnx2x: remove bogus check X-Git-Tag: v2.6.38-rc1~476^2~115 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b97f8e10893e2c8f64a2795901bdb447a3308f4;p=platform%2Fkernel%2Flinux-stable.git bnx2x: remove bogus check We dereferenced params on the line before so it's too late to check if params is NULL. In fact, params can never be NULL and strict_cos is either 0 or 1 so that part of the check is bogus too. Let's remove it. Signed-off-by: Dan Carpenter Acked-by: Eilon Greenstein Signed-off-by: David S. Miller --- diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index 97cbee2..43b0de2 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c @@ -354,9 +354,6 @@ u8 bnx2x_ets_strict(const struct link_params *params, const u8 strict_cos) struct bnx2x *bp = params->bp; u32 val = 0; - if ((1 < strict_cos) && (NULL == params)) - return -EINVAL; - DP(NETIF_MSG_LINK, "ETS enabled strict configuration\n"); /** * Bitmap of 5bits length. Each bit specifies whether the entry behaves