Home
last modified time | relevance | path

Searched hist:bceb418b (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/usb/dwc3/
H A Ddwc3-st.cbceb418b Mon Aug 19 02:24:36 CDT 2019 Nishka Dasgupta <nishkadg.linux@gmail.com> 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: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
bceb418b Mon Aug 19 02:24:36 CDT 2019 Nishka Dasgupta <nishkadg.linux@gmail.com> 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: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>