File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -940,7 +940,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
940
940
int err ;
941
941
struct pci_host_bridge * bridge ;
942
942
943
- bridge = pci_alloc_host_bridge ( sizeof (* host ));
943
+ bridge = devm_pci_alloc_host_bridge ( dev , sizeof (* host ));
944
944
if (!bridge )
945
945
return - ENOMEM ;
946
946
@@ -952,7 +952,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
952
952
err = pci_parse_request_of_pci_ranges (dev , & host -> resources ,
953
953
& bridge -> dma_ranges , NULL );
954
954
if (err )
955
- goto err_free_bridge ;
955
+ return err ;
956
956
957
957
pm_runtime_enable (pcie -> dev );
958
958
err = pm_runtime_get_sync (pcie -> dev );
@@ -1034,9 +1034,6 @@ static int rcar_pcie_probe(struct platform_device *pdev)
1034
1034
pm_runtime_disable (dev );
1035
1035
pci_free_resource_list (& host -> resources );
1036
1036
1037
- err_free_bridge :
1038
- pci_free_host_bridge (bridge );
1039
-
1040
1037
return err ;
1041
1038
}
1042
1039
You can’t perform that action at this time.
0 commit comments