Search Linux Wireless

[PATCH] ray_cs: avoid potential null dereference in ray_get_wireless_stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Reported-by: Martin Ettl <ettl.martin@xxxxxx>
Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux