Skip to content
Commit bceb418b authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Felipe Balbi
Browse files

usb: dwc3: st: Add of_dev_put() in probe function



In function st_dwc3_probe, variable child_pdev takes the value returned
by of_find_device_by_node, which gets a device pointer but does not put
it. If child_pdev is not put before the probe function returns, it may
cause a reference leak. Hence put child_pdev after its last usage.
Issue found with Coccinelle.

Reviewed-by: default avatarPatrice Chotard <patrice.chotard@st.com>
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent e36721b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment