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 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.

[snip]
> +
> +exit_unlock:
> +	spin_unlock_irqrestore(&devdata->priv_lock, flags);
>  	return 0;

This should be returning ret. 

It's less likely that someone will accidentally overwrite or throw away
the status later, if the code just returns directly at the point of
error.

-- Ben
_______________________________________________
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