Commit 96cf850
slimbus: ngd: Fix reference count leak in qcom_slim_ngd_notify_slaves
The function qcom_slim_ngd_notify_slaves() calls of_slim_get_device() which
internally uses device_find_child() to obtain a device reference.
According to the device_find_child() documentation,
the caller must drop the reference with put_device() after use.
Found via static analysis and this is similar to commit 4e65bda
("ASoC: wcd934x: fix error handling in wcd934x_codec_parse_data()")
Fixes: 917809e ("slimbus: ngd: Add qcom SLIMBus NGD driver")
Cc: stable <[email protected]>
Signed-off-by: Miaoqian Lin <[email protected]>
Reviewed-by: Dmitry Baryshkov <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 1ebc180 commit 96cf850
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1241 | 1241 | | |
1242 | 1242 | | |
1243 | 1243 | | |
| 1244 | + | |
1244 | 1245 | | |
1245 | 1246 | | |
1246 | 1247 | | |
| |||
0 commit comments