binding a device driver could fail.. handle this case

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14493 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Christian Gmeiner 2007-08-28 20:50:41 +00:00
parent 195ef597f5
commit 4474d6827c
6 changed files with 19 additions and 11 deletions

View file

@ -160,7 +160,7 @@ void usb_storage_driver_init(void)
/*-------------------------------------------------------------------------*/
/* device driver ops */
void usb_storage_driver_bind(void* controler_ops)
int usb_storage_driver_bind(void* controler_ops)
{
ops = controler_ops;
@ -181,10 +181,11 @@ void usb_storage_driver_bind(void* controler_ops)
dev.out->claimed = true;
logf("usb storage: out: %s", dev.out->name);
return;
return 0;
autoconf_fail:
logf("failed to find endpoints");
return -EOPNOTSUPP;
}
int usb_storage_driver_request(struct usb_ctrlrequest* request)