File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ static int st_dwc3_probe(struct platform_device *pdev)
266
266
if (!child_pdev ) {
267
267
dev_err (dev , "failed to find dwc3 core device\n" );
268
268
ret = - ENODEV ;
269
- goto err_node_put ;
269
+ goto depopulate ;
270
270
}
271
271
272
272
dwc3_data -> dr_mode = usb_get_dr_mode (& child_pdev -> dev );
@@ -282,6 +282,7 @@ static int st_dwc3_probe(struct platform_device *pdev)
282
282
ret = st_dwc3_drd_init (dwc3_data );
283
283
if (ret ) {
284
284
dev_err (dev , "drd initialisation failed\n" );
285
+ of_platform_depopulate (dev );
285
286
goto undo_softreset ;
286
287
}
287
288
@@ -291,6 +292,8 @@ static int st_dwc3_probe(struct platform_device *pdev)
291
292
platform_set_drvdata (pdev , dwc3_data );
292
293
return 0 ;
293
294
295
+ depopulate :
296
+ of_platform_depopulate (dev );
294
297
err_node_put :
295
298
of_node_put (child );
296
299
undo_softreset :
You can’t perform that action at this time.
0 commit comments