]> www.infradead.org Git - users/jedix/linux-maple.git/commit
phy: qcom: qmp-combo: move driver data initialisation earlier
authorJohan Hovold <johan+linaro@kernel.org>
Wed, 11 Sep 2024 11:52:53 +0000 (13:52 +0200)
committerVinod Koul <vkoul@kernel.org>
Thu, 17 Oct 2024 13:04:16 +0000 (18:34 +0530)
commit1dd196f9004848d0318e8831f962cc76255431d8
treee5134ebde37200301e1b92872d098844fdf4fcdc
parent34c21f94fa1e147a19b54b6adf0c93a623b70dd8
phy: qcom: qmp-combo: move driver data initialisation earlier

Commit 44aff8e31080 ("phy: qcom-qmp-combo: clean up probe
initialisation") removed most users of the platform device driver data,
but mistakenly also removed the initialisation despite the data still
being used in the runtime PM callbacks.

The initialisation was soon after restored by commit 83a0bbe39b17 ("phy:
qcom-qmp-combo: add support for updated sc8280xp binding") but now
happens slightly later during probe. This should not cause any trouble
currently as runtime PM needs to be enabled manually through sysfs and
the platform device would not be suspended before the PHY has been
registered anyway.

Move the driver data initialisation to avoid a NULL-pointer dereference
on runtime suspend if runtime PM is ever enabled by default in this
driver.

Fixes: 44aff8e31080 ("phy: qcom-qmp-combo: clean up probe initialisation")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240911115253.10920-5-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-qmp-combo.c