Commit 469c068
pmdomain: imx: gpcv2: fix an OF node reference leak in imx_gpcv2_probe()
imx_gpcv2_probe() leaks an OF node reference obtained by
of_get_child_by_name(). Fix it by declaring the device node with the
__free(device_node) cleanup construct.
This bug was found by an experimental static analysis tool that I am
developing.
Fixes: 03aa126 ("soc: imx: Add GPCv2 power gating driver")
Signed-off-by: Joe Hattori <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>1 parent fac04ef commit 469c068
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1458 | 1458 | | |
1459 | 1459 | | |
1460 | 1460 | | |
1461 | | - | |
| 1461 | + | |
| 1462 | + | |
1462 | 1463 | | |
1463 | 1464 | | |
1464 | 1465 | | |
1465 | 1466 | | |
1466 | | - | |
1467 | 1467 | | |
1468 | 1468 | | |
1469 | 1469 | | |
| |||
0 commit comments