Skip to content

Commit

Permalink
spi: release lock on error path in spi_pump_messages()
Browse files Browse the repository at this point in the history
We should release the lock here and enable IRQs before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
[grant.likely: move unlock above dev_err() call]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Dan Carpenter authored and Grant Likely committed Mar 11, 2012
1 parent 054ebcc commit 9af4acc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ static void spi_pump_messages(struct kthread_work *work)
if (master->busy) {
ret = master->unprepare_transfer_hardware(master);
if (ret) {
spin_unlock_irqrestore(&master->queue_lock, flags);
dev_err(&master->dev,
"failed to unprepare transfer hardware\n");
return;
Expand Down

0 comments on commit 9af4acc

Please sign in to comment.