diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-10-13 21:19:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-10-14 17:14:40 -0400 |
commit | 0af49167b1e5ba154e90d2c454bf4624ee47df80 (patch) | |
tree | 87bdb980f7b6e376ae2b0bca31c05986b0d46772 /drivers | |
parent | 5f267996eb4501b45beecdfe7c9a9af714fc083f (diff) |
Staging: rt2860sta: prevent a panic when disabling when associated
This fixes a panic which is triggered when the hardware "disappears" from
beneath the driver, i.e. when wireless is toggled off via Fn-F2 on various
EeePC models.
Ref. bug report http://bugzilla.kernel.org/show_bug.cgi?id=13390
panic http://bugzilla.kernel.org/attachment.cgi?id=21928
Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rt2860/common/cmm_data_2860.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/rt2860/common/cmm_data_2860.c b/drivers/staging/rt2860/common/cmm_data_2860.c index fb1735533b74..857ff450b6c9 100644 --- a/drivers/staging/rt2860/common/cmm_data_2860.c +++ b/drivers/staging/rt2860/common/cmm_data_2860.c | |||
@@ -363,6 +363,8 @@ int RtmpPCIMgmtKickOut( | |||
363 | ULONG SwIdx = pAd->MgmtRing.TxCpuIdx; | 363 | ULONG SwIdx = pAd->MgmtRing.TxCpuIdx; |
364 | 364 | ||
365 | pTxD = (PTXD_STRUC) pAd->MgmtRing.Cell[SwIdx].AllocVa; | 365 | pTxD = (PTXD_STRUC) pAd->MgmtRing.Cell[SwIdx].AllocVa; |
366 | if (!pTxD) | ||
367 | return 0; | ||
366 | 368 | ||
367 | pAd->MgmtRing.Cell[SwIdx].pNdisPacket = pPacket; | 369 | pAd->MgmtRing.Cell[SwIdx].pNdisPacket = pPacket; |
368 | pAd->MgmtRing.Cell[SwIdx].pNextNdisPacket = NULL; | 370 | pAd->MgmtRing.Cell[SwIdx].pNextNdisPacket = NULL; |