[PATCH 3/7] staging: unisys: cleanup goto in create_visor_device()

Ben Romer benjamin.romer at unisys.com
Tue Feb 23 16:21:14 UTC 2016


On Tue, 2016-02-23 at 19:16 +0300, Dan Carpenter wrote:
> When you're reviewing, you only have to care about the most recent
> allocation.  After this point we need to call put_device().  After
> this
> point we need to call unregister.  The "goto unregister" is pretty
> obvious what it does so it means you don't have to scroll down.  Then
> when you read to the bottom, it's pretty obvious that the labels do
> what the name implies.

That makes sense. It seemed to me to be unnecessary complication to use
a goto, since there was only the one place where unregister was needed.

I'll put it back in and resend this one.

-- Ben


More information about the devel mailing list