Re: [PATCH] Change paride driver to use unlocked_ioctl instead of ioctl

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Nikanth Karthikesan <knikanth@...>
Cc: <grant@...>, <tim@...>, <linux-kernel@...>, <kernel-janitors@...>
Date: Wednesday, January 9, 2008 - 4:06 am

On Thu, Jan 10, 2008 at 11:44:20AM +0530, Nikanth Karthikesan wrote:

this looks line-wrapper by your mailer.


It's generally considered good style to only have as few as possible
return values.  And this is especially important when returning from
a section that's under a lock.  So in this case it would be much better
if you changes this function to have a local 'int error' variable
and then just do

	error = -EFOO;
	goto out_unlock;

wherever you have an early return with the end of the function looking
like


out_unlock:
	unlock_kernel();
	return error;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Change paride driver to use unlocked_ioctl instead o..., Nikanth Karthikesan, (Thu Jan 10, 2:14 am)
Re: [PATCH] Change paride driver to use unlocked_ioctl inste..., Christoph Hellwig, (Wed Jan 9, 4:06 am)
Re: [PATCH] Change paride driver to use unlocked_ioctl inste..., Nikanth Karthikesan, (Thu Jan 10, 3:23 am)