We should start the loop consistently with the "wl_lock" lock held.
Signed-off-by: Dan Carpenter <[email protected]>
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 3e4b9fb..b61cd10 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -466,6 +466,7 @@ static void wl1271_irq_work(struct work_struct *work)
intr = le32_to_cpu(wl->fw_status->intr);
if (!intr) {
wl1271_debug(DEBUG_IRQ, "Zero interrupt received.");
+ spin_lock_irqsave(&wl->wl_lock, flags);
continue;
}
On Sat, 2010-05-08 at 18:25 +0200, ext Dan Carpenter wrote:
> We should start the loop consistently with the "wl_lock" lock held.
>
> Signed-off-by: Dan Carpenter <[email protected]>
>
> diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
> index 3e4b9fb..b61cd10 100644
> --- a/drivers/net/wireless/wl12xx/wl1271_main.c
> +++ b/drivers/net/wireless/wl12xx/wl1271_main.c
> @@ -466,6 +466,7 @@ static void wl1271_irq_work(struct work_struct *work)
> intr = le32_to_cpu(wl->fw_status->intr);
> if (!intr) {
> wl1271_debug(DEBUG_IRQ, "Zero interrupt received.");
> + spin_lock_irqsave(&wl->wl_lock, flags);
> continue;
> }
>
Good catch. Thank you.
Acked-by: Luciano Coelho <[email protected]>
--
Cheers,
Luca.