]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wireless/hostap/hostap_cs.c
[PATCH] hostap: Fix null pointer dereference in prism2_pccard_card_present()
[linux-2.6-omap-h63xx.git] / drivers / net / wireless / hostap / hostap_cs.c
index 491cf49042c676eae2735abc890cec66fd4bbe92..e1f1eb8e484a78b8352ba4e370349a0abb0ca813 100644 (file)
@@ -212,7 +212,7 @@ static int prism2_event(event_t event, int priority,
 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;