Commit 1332661
memory: samsung: exynos5422-dmc: Fix refcount leak in of_get_dram_timings
of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
This function doesn't call of_node_put() in some error paths.
To unify the structure, Add put_node label and goto it on errors.
Fixes: 6e7674c ("memory: Add DMC driver for Exynos5422")
Signed-off-by: Miaoqian Lin <[email protected]>
Reviewed-by: Lukasz Luba <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Krzysztof Kozlowski <[email protected]>1 parent 038ae37 commit 1332661
1 file changed
+18
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1187 | 1187 | | |
1188 | 1188 | | |
1189 | 1189 | | |
1190 | | - | |
1191 | | - | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
1192 | 1194 | | |
1193 | 1195 | | |
1194 | 1196 | | |
1195 | | - | |
1196 | | - | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
1197 | 1201 | | |
1198 | 1202 | | |
1199 | 1203 | | |
1200 | | - | |
1201 | | - | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
1202 | 1208 | | |
1203 | 1209 | | |
1204 | 1210 | | |
1205 | 1211 | | |
1206 | 1212 | | |
1207 | | - | |
1208 | 1213 | | |
1209 | | - | |
| 1214 | + | |
| 1215 | + | |
1210 | 1216 | | |
1211 | 1217 | | |
1212 | 1218 | | |
1213 | 1219 | | |
1214 | | - | |
1215 | 1220 | | |
1216 | | - | |
| 1221 | + | |
| 1222 | + | |
1217 | 1223 | | |
1218 | 1224 | | |
1219 | 1225 | | |
| |||
1227 | 1233 | | |
1228 | 1234 | | |
1229 | 1235 | | |
1230 | | - | |
1231 | 1236 | | |
1232 | 1237 | | |
1233 | 1238 | | |
1234 | 1239 | | |
1235 | 1240 | | |
1236 | 1241 | | |
| 1242 | + | |
| 1243 | + | |
1237 | 1244 | | |
1238 | 1245 | | |
1239 | 1246 | | |
| |||
0 commit comments