Linux wireless drivers development
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: linux-wireless@vger.kernel.org
Cc: ettl.martin@gmx.de, "John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH] ray_cs: avoid potential null dereference in ray_get_wireless_stats
Date: Mon, 27 Jul 2009 10:34:42 -0400	[thread overview]
Message-ID: <1248705282-9951-1-git-send-email-linville@tuxdriver.com> (raw)

http://bugzilla.kernel.org/show_bug.cgi?id=13854

Reported-by: Martin Ettl <ettl.martin@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/ray_cs.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 698b11b..a4308a6 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -1508,11 +1508,13 @@ static int ray_commit(struct net_device *dev, struct iw_request_info *info,	/* N
 static iw_stats *ray_get_wireless_stats(struct net_device *dev)
 {
 	ray_dev_t *local = netdev_priv(dev);
-	struct pcmcia_device *link = local->finder;
-	struct status __iomem *p = local->sram + STATUS_BASE;
+	struct pcmcia_device *link;
+	struct status __iomem *p;
 
 	if (local == (ray_dev_t *) NULL)
 		return (iw_stats *) NULL;
+	link = local->finder;
+	p = local->sram + STATUS_BASE;
 
 	local->wstats.status = local->card_status;
 #ifdef WIRELESS_SPY
-- 
1.6.2.5


             reply	other threads:[~2009-07-27 14:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-27 14:34 John W. Linville [this message]
2009-07-27 15:02 ` [PATCH] ray_cs: remove bocus NULL check at head of ray_get_wireless_stats John W. Linville

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1248705282-9951-1-git-send-email-linville@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=ettl.martin@gmx.de \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox