On Tue, Feb 23, 2016 at 11:21:14AM -0500, Ben Romer wrote: > 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. > Yeah. But there were three places where put_device() is needed. In patch 4 there is only one kfree() on error so that is fine either way. regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel