Re: [PATCH 2/3] cdc-wdm: unify error handling in write

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

 



On Fri, 2015-03-20 at 15:02 +0100, Bjørn Mork wrote:
> Oliver Neukum <oneukum@xxxxxxx> writes:
> 
> > This makes sure the error handling path is the same for
> > all error conditions, thus reducing code duplication.
> 
> Great!  This looks like I nice cleanup.  Will test it out.  Just a quick
> comment based on the first glance:
> 
> >  outnl:
> >  	return rv < 0 ? rv : count;
> 
> How about changing the single remaining error without any rewinding into
> a direct "return -ENOMEM", and then drop the "outnl" label and simplify
> this to "return count"?

That would be the direct opposite of what this patch tries to do.
Direct returns in a function with lock are not what I prefer to do.

	Regards
		Oliver


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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux