Commit ed33fbb
PM / devfreq: event: Call of_node_put() only once in devfreq_event_get_edev_by_phandle()
An of_node_put(node) call was immediately used after a null pointer check
for the local variable “edev” at the end of this function implementation.
Thus call such a function only once instead directly before the check.
This issue was transformed by using the Coccinelle software.
Link: https://lore.kernel.org/lkml/[email protected]/
Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>1 parent 40384c8 commit ed33fbb
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | 247 | | |
| 248 | + | |
| 249 | + | |
254 | 250 | | |
255 | 251 | | |
256 | 252 | | |
| |||
0 commit comments