From patchwork Mon Jul 27 15:02:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "John W. Linville" X-Patchwork-Id: 37544 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6RF5lXL011844 for ; Mon, 27 Jul 2009 15:05:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752540AbZG0PEw (ORCPT ); Mon, 27 Jul 2009 11:04:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752518AbZG0PEv (ORCPT ); Mon, 27 Jul 2009 11:04:51 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:51482 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751111AbZG0PEt (ORCPT ); Mon, 27 Jul 2009 11:04:49 -0400 Received: from uucp by smtp.tuxdriver.com with local-rmail (Exim 4.63) (envelope-from ) id 1MVRkt-0005bT-8L; Mon, 27 Jul 2009 11:04:47 -0400 Received: from linville-t400.local (linville-t400.local [127.0.0.1]) by linville-t400.local (8.14.3/8.14.3) with ESMTP id n6RF2nop010468; Mon, 27 Jul 2009 11:02:49 -0400 Received: (from linville@localhost) by linville-t400.local (8.14.3/8.14.3/Submit) id n6RF2nxv010466; Mon, 27 Jul 2009 11:02:49 -0400 From: "John W. Linville" To: linux-wireless@vger.kernel.org Cc: ettl.martin@gmx.de, johannes@sipsolutions.net, "John W. Linville" Subject: [PATCH] ray_cs: remove bocus NULL check at head of ray_get_wireless_stats Date: Mon, 27 Jul 2009 11:02:49 -0400 Message-Id: <1248706969-10435-1-git-send-email-linville@tuxdriver.com> X-Mailer: git-send-email 1.6.2.5 In-Reply-To: <1248705282-9951-1-git-send-email-linville@tuxdriver.com> References: <1248705282-9951-1-git-send-email-linville@tuxdriver.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Reported-by: Johannes Berg Cc: Martin Ettl Signed-off-by: John W. Linville --- Johannes points-out that the NULL check is mostly bogus given how netdev_priv is computed and how get_wireless_stats gets called... drivers/net/wireless/ray_cs.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 698b11b..8fdea7f 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c @@ -1511,9 +1511,6 @@ static iw_stats *ray_get_wireless_stats(struct net_device *dev) struct pcmcia_device *link = local->finder; struct status __iomem *p = local->sram + STATUS_BASE; - if (local == (ray_dev_t *) NULL) - return (iw_stats *) NULL; - local->wstats.status = local->card_status; #ifdef WIRELESS_SPY if ((local->spy_data.spy_number > 0)