Re: [patch] [media] ngene: remove an unneeded condition

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

 



On Sat, Apr 28, 2012 at 06:23:58PM +0200, walter harms wrote:
> i agree but in this special case it looks strange. Would that more
> readable ?
> 
> if (stat < 0)
> {
> <errorhandling here>	
>  return stat;	
> }
> 	
> return 0:
> 

No.  Gotos are perfectly fine for unwinding in the error handling
code.  In this case there are several in a row.  Copy and pasting
the error handling leads to forgot to add a kfree() bugs.

It doesn't look weird at all, it looks like the most normal kind of
error handling there is in the kernel.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux