]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm: usb: Adjust usb_alloc_new_device() to return an error
authorSimon Glass <sjg@chromium.org>
Wed, 25 Mar 2015 18:22:01 +0000 (12:22 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 19:47:53 +0000 (21:47 +0200)
commitb6c14780a4e57b09da46fe382748b8da63a7181a
tree1e72026e9c0c2eb425a498c23e6d1dff0357841f
parentf960560e4d8b82712be25e76856a8d91ae6f5e5c
dm: usb: Adjust usb_alloc_new_device() to return an error

This function returns NULL on error at present. Adjust it so that we can
return a real error, as is needed with driver model. Also improve the
error handling in its caller, usb_hub_port_connect_change(), and adjust
the code order to prepare for driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
common/usb.c
common/usb_hub.c
include/usb.h