usb: dwc3-msm: Don't use devm_ioremap when ringing GSI DB
Each time gsi_ring_db() is invoked, devm_ioremap_nocache() is called to map the physical IO address in order to use writel(). However, devm_* calls will allocate a pointer to store with the struct device and will not get freed until the device or driver is removed, so in effect causes memory to be slowly eaten for every GSI doorbell update, such as function bind. Change the devm_ call to ioremap_nocache() followed by explicit iounmap(). Also, if ioremap() fails, print an error message and bail since the writel() would have no chance of succeeding. Change-Id: I055774c24e2fbe86422756ea34b6a6e34ec21fb6 Signed-off-by:Jack Pham <jackp@codeaurora.org> Signed-off-by:
Pratham Pratap <prathampratap@codeaurora.org>
Loading
Please register or sign in to comment