[PATCH 1/3] phy: qcom-qmp-usb: fix NULL pointer dereference in PM callbacks
Kathiravan Thirumoorthy
kathiravan.thirumoorthy at oss.qualcomm.com
Tue Sep 9 01:34:02 PDT 2025
On 9/1/2025 7:24 PM, Vinod Koul wrote:
> On 25-08-25, 17:22, Kathiravan Thirumoorthy wrote:
>> From: Poovendhan Selvaraj<quic_poovendh at quicinc.com>
>>
>> The pm ops are enabled before qmp phy create which causes
>> a NULL pointer dereference when accessing qmp->phy->init_count
>> in the qmp_usb_runtime_suspend.
>>
>> So if qmp->phy is NULL, bail out early in suspend / resume callbacks
>> to avoid the NULL pointer dereference in qmp_usb_runtime_suspend and
>> qmp_usb_runtime_resume.
> That is a band-aid. we should enable pm only when ready...
> Why not do that instead?
Thanks Vinod. Sorry for the delay, I'm just back from my vacation.
Sure, let me check why the PM is getting enabled before its ready.
Thanks,
Kathiravan T.
More information about the linux-phy
mailing list