Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5a58e2c authored by Guang Jian Zeng's avatar Guang Jian Zeng
Browse files

usb: host: xhci-msm-hsic: fix memory leak



Memory for the xhci_hcd structure stored in hcd->hcd_priv
is allocated by xhci_gen_setup() when creating the HCD,
but needs to be explicitly freed by the wrapper driver.
Call kfree on it in the HSIC remove function.

Change-Id: I35e9ea88b203daebcc4bdc00d442956e1c88d2e7
CRs-Fixed: 601546
Signed-off-by: default avatarGuang Jian Zeng <gzeng@codeaurora.org>
parent 5830ea78
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1212,6 +1212,7 @@ static int mxhci_hsic_remove(struct platform_device *pdev)
	mxhci_hsic_init_vddcx(mxhci, 0);
	mxhci_hsic_init_clocks(mxhci, 0);
	mxhci_msm_config_gdsc(mxhci, 0);
	kfree(xhci);
	usb_put_hcd(hcd);

	return 0;