tree 100c6e7d12bea013586d540b3d8ca27c451af049
parent 6c5b90d2c84d557baed56e71729504b467ff3e5b
author Kalle Valo <[EMAIL PROTECTED]> Sun, 28 Aug 2005 22:46:57 +0300
committer Jeff Garzik <[EMAIL PROTECTED]> Mon, 29 Aug 2005 03:25:02 -0400

[PATCH] hostap: Fix null pointer dereference in prism2_pccard_card_present()

With my Buffalo WLI-CF-S11G PC Card kernel oopses every time in
prism2_interrupt() when I try load the hostap module. local->hw_priv is null
during the first call to prism2_interrupt(). It feels like
interrupts are enabled too early, or something.

This patch fixes the symptom, but not the cause.

Signed-off-by: Kalle Valo <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>

 drivers/net/wireless/hostap/hostap_cs.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/hostap/hostap_cs.c 
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -212,7 +212,7 @@ static int prism2_event(event_t event, i
 static int prism2_pccard_card_present(local_info_t *local)
        struct hostap_cs_priv *hw_priv = local->hw_priv;
-       if (hw_priv->link != NULL &&
+       if (hw_priv != NULL && hw_priv->link != NULL &&
            ((hw_priv->link->state & (DEV_PRESENT | DEV_CONFIG)) ==
             (DEV_PRESENT | DEV_CONFIG)))
                return 1;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to