diff options
Diffstat (limited to 'drivers/usb/gadget/f_rndis.c')
-rw-r--r-- | drivers/usb/gadget/f_rndis.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index eed3ad878047..9c41e9515b8e 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c | |||
@@ -687,7 +687,7 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f) | |||
687 | f->os_desc_table = kzalloc(sizeof(*f->os_desc_table), | 687 | f->os_desc_table = kzalloc(sizeof(*f->os_desc_table), |
688 | GFP_KERNEL); | 688 | GFP_KERNEL); |
689 | if (!f->os_desc_table) | 689 | if (!f->os_desc_table) |
690 | return PTR_ERR(f->os_desc_table); | 690 | return -ENOMEM; |
691 | f->os_desc_n = 1; | 691 | f->os_desc_n = 1; |
692 | f->os_desc_table[0].os_desc = &rndis_opts->rndis_os_desc; | 692 | f->os_desc_table[0].os_desc = &rndis_opts->rndis_os_desc; |
693 | } | 693 | } |
@@ -905,6 +905,7 @@ static struct usb_function_instance *rndis_alloc_inst(void) | |||
905 | { | 905 | { |
906 | struct f_rndis_opts *opts; | 906 | struct f_rndis_opts *opts; |
907 | struct usb_os_desc *descs[1]; | 907 | struct usb_os_desc *descs[1]; |
908 | char *names[1]; | ||
908 | 909 | ||
909 | opts = kzalloc(sizeof(*opts), GFP_KERNEL); | 910 | opts = kzalloc(sizeof(*opts), GFP_KERNEL); |
910 | if (!opts) | 911 | if (!opts) |
@@ -922,8 +923,9 @@ static struct usb_function_instance *rndis_alloc_inst(void) | |||
922 | INIT_LIST_HEAD(&opts->rndis_os_desc.ext_prop); | 923 | INIT_LIST_HEAD(&opts->rndis_os_desc.ext_prop); |
923 | 924 | ||
924 | descs[0] = &opts->rndis_os_desc; | 925 | descs[0] = &opts->rndis_os_desc; |
926 | names[0] = "rndis"; | ||
925 | usb_os_desc_prepare_interf_dir(&opts->func_inst.group, 1, descs, | 927 | usb_os_desc_prepare_interf_dir(&opts->func_inst.group, 1, descs, |
926 | THIS_MODULE); | 928 | names, THIS_MODULE); |
927 | config_group_init_type_name(&opts->func_inst.group, "", | 929 | config_group_init_type_name(&opts->func_inst.group, "", |
928 | &rndis_func_type); | 930 | &rndis_func_type); |
929 | 931 | ||