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
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to