Re: thunderbolt: Use common error handling code in update_property_block()

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

 



> It is fine to use goto as it is described in the document you linked but
> this what you are doing is certainly not fine, at least in the code I'm
> maintaining:
>
> out_unlock:
>  	mutex_unlock(&xd->lock);
>   	mutex_unlock(&xdomain_lock);
> 	return;
>
> out_free_dir:
> 	tb_property_free_dir(dir);
> 	goto out_unlock;
>
> This "goto out_unlock" adds another goto to upwards which makes it
> really hard to follow because the flow is not anymore just downwards.

Would you like to benefit any more from the application of
scope-based resource management?

Regards,
Markus





[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