Re: [PATCH 15/18] USB: pl2303: return errors from usb_submit_urb in open

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

 



Am Mittwoch, 9. November 2011, 16:31:33 schrieb Johan Hovold:
> On Wed, Nov 09, 2011 at 12:55:14PM +0100, Oliver Neukum wrote:
> > Am Sonntag, 6. November 2011, 19:06:34 schrieb Johan Hovold:
> > > Return errors from usb_submit_urb rather than EPROTO on errors in open.
> > 
> > It strikes me as somewhat unwise to leak USB specific error codes potentially
> > up to user space.
> 
> That is what almost all usb-serial drivers currently do (and have been
> doing for a very long time). If this is to be changed it should probably
> be handled in usb-serial core for consistency reasons. And the
> appropriate error code would be EIO rather than EPROTO, right?

That depends on the exact error. There's a small helper for this usage
defined in usb.h. It is called usb_translate_errors()

	HTH
		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