phy: qcom-qmp-combo: fix memleak on probe deferral
authorJohan Hovold <johan+linaro@kernel.org>
Fri, 3 Feb 2023 22:26:13 +0000 (14:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:26:46 +0000 (11:26 +0100)
commit2f27d3811a41a66b1d9d7c87b4af76bcdf0c9e05
tree2225cbb6e2c8a61ed36891f61e6f549b0e8f75ec
parent0cb10ddab7dff172aff63d0c7cb0110a1f5b5b5e
phy: qcom-qmp-combo: fix memleak on probe deferral

commit 2de8a325b1084330ae500380cc27edc39f488c30 upstream.

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-5-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/qualcomm/phy-qcom-qmp.c