spi: release lock on error path in spi_pump_messages()
Subsystems (2)
PATCH 1/1 spi: release lock on error path in spi_pump_messages()
We should release the lock here and enable IRQs before returning.
drivers/spi/spi.c +1 -0
@@ -535,6 +535,7 @@ static void spi_pump_messages(struct kthread_work *work)if (ret) {dev_err (&master->dev,"failed to unprepare transfer hardware\n" ); +spin_unlock_irqrestore (&master->queue_lock, flags);return ; } }
Am 10.03.2012 09:57, schrieb Dan Carpenter:
Quoted 9 lines
We should release the lock here and enable IRQs before returning.
Signed-off-by Dan Carpenter <[email protected]>drivers/spi/spi.c +0
-0
drivers/spi/spi.c static void spi_pump_messages(struct kthread_work *work) · line 541
Quoted 7 lines
drivers/spi/spi.c +1
-0@@ -535,6 +535,7 @@ static void spi_pump_messages(struct kthread_work *work)if (ret) {dev_err (&master->dev,"failed to unprepare transfer hardware\n" ); +spin_unlock_irqrestore (&master->queue_lock, flags);return ; } }
hi Dan,
do you want to protect dev_err() by a spn_lock ?
re,
wh
Quoted 6 lines
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Grant Likely
AppliedQuoted 7 lines · walter harms
Am 10.03.2012 09:57, schrieb Dan Carpenter:
Quoted 4 lines
We should release the lock here and enable IRQs before returning.
Signed-off-by Dan Carpenter <[email protected]>
Quoted 16 lines
drivers/spi/spi.c static void spi_pump_messages(struct kthread_work *work) · line 541
Quoted 12 lines
drivers/spi/spi.c +1
-0@@ -535,6 +535,7 @@ static void spi_pump_messages(struct kthread_work *work)if (ret) {dev_err (&master->dev,"failed to unprepare transfer hardware\n" ); +spin_unlock_irqrestore (&master->queue_lock, flags);return ; } }hi Dan,
do you want to protectdev_err()by aspn_lock?
Applied, after moving unlock above the dev_err.
g.
Quoted 6 lines · Grant Likely
Quoted 2 lines · walter harms
hi Dan,
do you want to protectdev_err()by aspn_lock?Applied, after moving unlock above the
dev_err.
Thanks.
I was going to resend this with Walter's change btw. I wasn't going to ignore his review comments.
Anyway, thanks again Grant and Walter.
regards,
dan carpenter
Quoted 5 lines · Dan Carpenter
Quoted 4 lines · Grant Likely
Quoted 2 lines · walter harms
hi Dan,
do you want to protectdev_err()by aspn_lock?
Quoted 7 lines
Quoted 2 lines
Applied, after moving unlock above the
dev_err.Thanks.
I was going to resend this with Walter's change btw. I wasn't going to ignore his review comments.
I assumed you would. It was just simpler for me to pick it up with the trivial change.
g.