2010-05-08 16:25:31

by Dan Carpenter

[permalink] [raw]
Subject: [patch 7/9] wl1271: add missing spin_lock()

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;
}



2010-05-11 04:27:19

by Luciano Coelho

[permalink] [raw]
Subject: Re: [patch 7/9] wl1271: add missing spin_lock()

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.