Commit 857a313
EDAC/i5100: Fix error handling order in i5100_init_one()
When pci_get_device_func() fails, the driver doesn't need to execute
pci_dev_put(). mci should still be freed, though, to prevent a memory
leak. When pci_enable_device() fails, the error injection PCI device
"einj" doesn't need to be disabled either.
[ bp: Massage commit message, rename label to "bail_mc_free". ]
Fixes: 52608ba ("i5100_edac: probe for device 19 function 0")
Signed-off-by: Dinghao Liu <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]1 parent b5fb513 commit 857a313
1 file changed
+5
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
1064 | | - | |
| 1064 | + | |
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
1070 | | - | |
| 1070 | + | |
1071 | 1071 | | |
1072 | 1072 | | |
1073 | | - | |
1074 | 1073 | | |
1075 | 1074 | | |
1076 | 1075 | | |
| |||
1136 | 1135 | | |
1137 | 1136 | | |
1138 | 1137 | | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | 1138 | | |
1143 | 1139 | | |
1144 | 1140 | | |
1145 | 1141 | | |
1146 | 1142 | | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
1147 | 1146 | | |
1148 | 1147 | | |
1149 | 1148 | | |
| |||
0 commit comments