From patchwork Tue Dec 21 07:04:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 76263 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 5BEEDB7063 for ; Tue, 21 Dec 2010 18:04:26 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752447Ab0LUHEU (ORCPT ); Tue, 21 Dec 2010 02:04:20 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:49213 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752082Ab0LUHET (ORCPT ); Tue, 21 Dec 2010 02:04:19 -0500 Received: by wyb28 with SMTP id 28so3640693wyb.19 for ; Mon, 20 Dec 2010 23:04:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=/vh002bAMO2BttYBqWCWR+t0dJjgdjKz0w0cp7y29qs=; b=XV0RXs0zJVSfKfhQkDKlYuiAeqQ9bRiXMSg0WGfznc2UdxUz34dKPpSwv8oWF1OGnB JI4BXKD1rJJFZBIKTxOUTcXOgseGqWsqpP0IIzhi2uWXv7uEakFJ+WiuKIPcNA1ClXWn uwKjYoLYZme5LJVmZ3qdwhuvZ8JrJmoTbTgwo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=V8hWTk/4KGcw9UegaKLPKU+tRTS7HX4ZH02prg4zvfmW1G6NohcbdkwPgKmFu9FNm+ TCYCaE9VxgLAyDmvaTkowByFcm2aBlftmikdCiai8a9flQFkXSZXIfFasxMtdY+whQ+d ccB+77oJnGYIG1A6GJlei4288guI5hO5w/l1Y= Received: by 10.216.183.145 with SMTP id q17mr3882964wem.5.1292915057623; Mon, 20 Dec 2010 23:04:17 -0800 (PST) Received: from bicker ([41.202.225.145]) by mx.google.com with ESMTPS id n78sm2298787weq.3.2010.12.20.23.04.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 20 Dec 2010 23:04:16 -0800 (PST) Date: Tue, 21 Dec 2010 10:04:02 +0300 From: Dan Carpenter To: Eilon Greenstein Cc: netdev@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch -next] bnx2x: remove bogus check Message-ID: <20101221070401.GF1936@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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