diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/cdc2.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/f_obex.c | 1 | ||||
-rw-r--r-- | drivers/usb/gadget/f_sourcesink.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/multi.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/zero.c | 2 | ||||
-rw-r--r-- | drivers/usb/phy/phy.c | 2 |
6 files changed, 12 insertions, 5 deletions
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c index c6ee6f1558c3..2c5255182769 100644 --- a/drivers/usb/gadget/cdc2.c +++ b/drivers/usb/gadget/cdc2.c @@ -129,8 +129,10 @@ static int __init cdc_do_config(struct usb_configuration *c) return PTR_ERR(fi_serial); f_acm = usb_get_function(fi_serial); - if (IS_ERR(f_acm)) + if (IS_ERR(f_acm)) { + status = PTR_ERR(f_acm); goto err_func_acm; + } status = usb_add_function(c, f_acm); if (status) diff --git a/drivers/usb/gadget/f_obex.c b/drivers/usb/gadget/f_obex.c index 29a348a2a294..8aa2be5329bc 100644 --- a/drivers/usb/gadget/f_obex.c +++ b/drivers/usb/gadget/f_obex.c @@ -348,6 +348,7 @@ static int obex_bind(struct usb_configuration *c, struct usb_function *f) /* allocate instance-specific endpoints */ + status = -ENODEV; ep = usb_ep_autoconfig(cdev->gadget, &obex_fs_ep_in_desc); if (!ep) goto fail; diff --git a/drivers/usb/gadget/f_sourcesink.c b/drivers/usb/gadget/f_sourcesink.c index 41adf3ef96c2..a8895859a221 100644 --- a/drivers/usb/gadget/f_sourcesink.c +++ b/drivers/usb/gadget/f_sourcesink.c @@ -898,7 +898,7 @@ static struct usb_function *source_sink_alloc_func( return &ss->function; } -static void acm_free_instance(struct usb_function_instance *fi) +static void source_sink_free_instance(struct usb_function_instance *fi) { struct f_ss_opts *ss_opts; @@ -913,7 +913,7 @@ static struct usb_function_instance *source_sink_alloc_inst(void) ss_opts = kzalloc(sizeof(*ss_opts), GFP_KERNEL); if (!ss_opts) return ERR_PTR(-ENOMEM); - ss_opts->func_inst.free_func_inst = acm_free_instance; + ss_opts->func_inst.free_func_inst = source_sink_free_instance; return &ss_opts->func_inst; } DECLARE_USB_FUNCTION(SourceSink, source_sink_alloc_inst, diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index a74ebefc7682..4a45e80c6e38 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c @@ -157,8 +157,10 @@ static __init int rndis_do_config(struct usb_configuration *c) return ret; f_acm_rndis = usb_get_function(fi_acm); - if (IS_ERR(f_acm_rndis)) + if (IS_ERR(f_acm_rndis)) { + ret = PTR_ERR(f_acm_rndis); goto err_func_acm; + } ret = usb_add_function(c, f_acm_rndis); if (ret) diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index 685fa681cb65..2cd6262e8b71 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c @@ -368,8 +368,10 @@ static int zero_unbind(struct usb_composite_dev *cdev) del_timer_sync(&autoresume_timer); if (!IS_ERR_OR_NULL(func_ss)) usb_put_function(func_ss); + usb_put_function_instance(func_inst_ss); if (!IS_ERR_OR_NULL(func_lb)) usb_put_function(func_lb); + usb_put_function_instance(func_inst_lb); return 0; } diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index f52c006417ff..a9984c700d2c 100644 --- a/drivers/usb/phy/phy.c +++ b/drivers/usb/phy/phy.c @@ -413,7 +413,7 @@ EXPORT_SYMBOL_GPL(usb_remove_phy); * * To be used by platform specific initialization code. */ -int __init usb_bind_phy(const char *dev_name, u8 index, +int usb_bind_phy(const char *dev_name, u8 index, const char *phy_dev_name) { struct usb_phy_bind *phy_bind; |