Skip to content

Commit

Permalink
[PATCH] hostap: Fix null pointer dereference in prism2_pccard_card_pr…
Browse files Browse the repository at this point in the history
…esent()

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 <Kalle.Valo@iki.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
Kalle Valo authored and Jeff Garzik committed Aug 28, 2005
1 parent 6c5b90d commit a8eef8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/hostap/hostap_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a8eef8a

Please sign in to comment.