Re: drivers/spi/spi.c:1160:3-9: preceding lock on line 1153

From: Mark Brown
Date: Tue Aug 09 2016 - 12:44:02 EST


On Tue, Aug 09, 2016 at 06:35:06PM +0200, Julia Lawall wrote:
> On Tue, 9 Aug 2016, Mark Brown wrote:
> > On Tue, Aug 09, 2016 at 06:19:13PM +0200, Julia Lawall wrote:

> > > Looks worth checking.

> > I don't really have any idea what this is trying to tell me, sorry.

> The important lines are the ones with the @. Line 1153 takes a lock and
> in line 1160 there is a return in error handling code with the lock still
> held. The semantic patch that reported this should also only give a
> report if there is some patch out of the function that releases the lock.
> Overall, it seems unusual to keep the lock in an error case.

I'm not sure how I'm supposed to identify that from the message to be
honest - I'd expect something that more directly referenced both lines
and ideally said something like "lock held when returning". But yes, it
does look like an issue thanks.

Attachment: signature.asc
Description: PGP signature