Commit 07a5dcc
remoteproc: qcom_q6v5_mss: Fix some leaks in q6v5_alloc_memory_region
The device_node pointer is returned by of_parse_phandle() or
of_get_child_by_name() with refcount incremented.
We should use of_node_put() on it when done.
This function only call of_node_put(node) when of_address_to_resource
succeeds, missing error cases.
Fixes: 278d744 ("remoteproc: qcom: Fix potential device node leaks")
Fixes: 051fb70 ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220308064522.13804-1-linmq006@gmail.com1 parent 8f90161 commit 07a5dcc
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1806 | 1806 | | |
1807 | 1807 | | |
1808 | 1808 | | |
1809 | | - | |
| 1809 | + | |
1810 | 1810 | | |
1811 | 1811 | | |
1812 | | - | |
| 1812 | + | |
1813 | 1813 | | |
| 1814 | + | |
| 1815 | + | |
1814 | 1816 | | |
1815 | 1817 | | |
| 1818 | + | |
1816 | 1819 | | |
1817 | 1820 | | |
1818 | 1821 | | |
1819 | 1822 | | |
1820 | | - | |
1821 | 1823 | | |
1822 | 1824 | | |
1823 | 1825 | | |
| |||
1828 | 1830 | | |
1829 | 1831 | | |
1830 | 1832 | | |
| 1833 | + | |
1831 | 1834 | | |
1832 | 1835 | | |
1833 | 1836 | | |
| 1837 | + | |
1834 | 1838 | | |
1835 | 1839 | | |
1836 | 1840 | | |
1837 | 1841 | | |
1838 | | - | |
1839 | 1842 | | |
1840 | 1843 | | |
1841 | 1844 | | |
| |||
0 commit comments