]> git.ipfire.org Git - people/ms/u-boot.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)
committerSimon Glass <sjg@chromium.org>
Sat, 18 Apr 2015 17:11:20 +0000 (11:11 -0600)
commit79b5888729b65e7040d6a964f0015fc2c21b2385
tree3497e7a22e622a32b7f3257682456087b17e409c
parentcad4291cd053f8eaa404e47ab289a6169c19ae93
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