lkml.org 
[lkml]   [2012]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] spi: release lock on error path in spi_pump_messages()


Am 10.03.2012 09:57, schrieb Dan Carpenter:
> We should release the lock here and enable IRQs before returning.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index 5ae1e84..ab1bdce 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -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

> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>


\
 
 \ /
  Last update: 2012-03-10 10:41    [W:0.048 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site