aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/dummy_hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/dummy_hcd.c')
-rw-r--r--drivers/usb/gadget/dummy_hcd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index a792e322f4f1..c588e8e486e5 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -1001,7 +1001,6 @@ static int dummy_udc_remove(struct platform_device *pdev)
1001 struct dummy *dum = platform_get_drvdata(pdev); 1001 struct dummy *dum = platform_get_drvdata(pdev);
1002 1002
1003 usb_del_gadget_udc(&dum->gadget); 1003 usb_del_gadget_udc(&dum->gadget);
1004 platform_set_drvdata(pdev, NULL);
1005 device_remove_file(&dum->gadget.dev, &dev_attr_function); 1004 device_remove_file(&dum->gadget.dev, &dev_attr_function);
1006 return 0; 1005 return 0;
1007} 1006}
@@ -2661,8 +2660,10 @@ static int __init init(void)
2661 } 2660 }
2662 for (i = 0; i < mod_data.num; i++) { 2661 for (i = 0; i < mod_data.num; i++) {
2663 dum[i] = kzalloc(sizeof(struct dummy), GFP_KERNEL); 2662 dum[i] = kzalloc(sizeof(struct dummy), GFP_KERNEL);
2664 if (!dum[i]) 2663 if (!dum[i]) {
2664 retval = -ENOMEM;
2665 goto err_add_pdata; 2665 goto err_add_pdata;
2666 }
2666 retval = platform_device_add_data(the_hcd_pdev[i], &dum[i], 2667 retval = platform_device_add_data(the_hcd_pdev[i], &dum[i],
2667 sizeof(void *)); 2668 sizeof(void *));
2668 if (retval) 2669 if (retval)