phy: qcom-qmp-pcie-msm8996: fix memleak on probe deferral
authorJohan Hovold <johan+linaro@kernel.org>
Fri, 16 Sep 2022 10:23:32 +0000 (12:23 +0200)
committerVinod Koul <vkoul@kernel.org>
Tue, 20 Sep 2022 06:01:16 +0000 (11:31 +0530)
commit1f69ededf8e80c42352e7f1c165a003614de9cc2
tree71c93b218c74c52ca910d7e80e7bbda38ed86e30
parent4be26f695ffa458b065b7942dbff9393bf0836ea
phy: qcom-qmp-pcie-msm8996: fix memleak on probe deferral

Switch to using the device-managed of_iomap helper to avoid leaking
memory on probe deferral and driver unbind.

Note that this helper checks for already reserved regions and may fail
if there are multiple devices claiming the same memory.

Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220916102340.11520-4-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c