Re: [PATCH v3 13/14] staging: unisys: fix else statement in visornic_main.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 09, 2016 at 10:16:12AM -0500, Ben Romer wrote:
> On Mon, 2016-02-08 at 22:39 +0530, Sudip Mukherjee wrote:
> > maybe this is better where you have single exit point and so only one
> > spin_unlock_irqrestore().
> 
> 
> We discussed this before. I don't want to put any of the goto messes
> back in because I don't think it shortens the code or makes it any
> simpler.

yes, now i remember. Sorry for suggesting the same thing again.
Documentation/CodingStyle says:
"The goto statement comes in handy when a function exits from multiple
locations and some common work such as cleanup has to be done.  If there
is no cleanup needed then just return directly."

IMHO, the patch I posted or this suggestion does not go against that.
But anyway, since you are opposed to it I will not send the patch again.

> 
> [snip]
> > +
> > +exit_unlock:
> > +	spin_unlock_irqrestore(&devdata->priv_lock, flags);
> >  	return 0;
> 
> This should be returning ret.

yes, ofcourse. my mistake.

regards
sudip
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux