Commit 66b7e9f
net: renesas: rswitch: avoid use-after-put for a device tree node
The device tree node saved in the rswitch_device structure is used at
several driver locations. So passing this node to of_node_put() after
the first use is wrong.
Move of_node_put() for this node to exit paths.
Fixes: b46f1e5 ("net: renesas: rswitch: Simplify struct phy * handling")
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://patch.msgid.link/20241208095004.69468-5-nikita.yoush@cogentembedded.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent bb61732 commit 66b7e9f
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1891 | 1891 | | |
1892 | 1892 | | |
1893 | 1893 | | |
1894 | | - | |
1895 | 1894 | | |
1896 | 1895 | | |
1897 | 1896 | | |
| |||
1921 | 1920 | | |
1922 | 1921 | | |
1923 | 1922 | | |
| 1923 | + | |
1924 | 1924 | | |
1925 | 1925 | | |
1926 | 1926 | | |
| |||
1934 | 1934 | | |
1935 | 1935 | | |
1936 | 1936 | | |
| 1937 | + | |
1937 | 1938 | | |
1938 | 1939 | | |
1939 | 1940 | | |
| |||
0 commit comments