Re: [PATCH RESEND 3/4] PM / devfreq: Fix governor_store() failing when device has no current governor
From: Yaxiong Tian
Date: Tue Mar 31 2026 - 05:54:43 EST
在 2026/3/31 17:37, Jie Zhan 写道:
---skip------
Ok, the code here starts the governor and directly goes to 'out' that
unlocks mutex, so create_sysfs_files() is skipped.
For example, setting 'userspace' as the governor won't create its belonging
files.
Therefore, I'd suggest that doing a NULL pointer check before the IMMUTABLE
flag check and stopping governor, where df->governor is used, so the
existing logic is not changed.
Yes, I missed that. However, we still need to check df->governor later and perform corresponding operations.
How about adding ret = sysfs_update_group(&df->dev.kobj, &gov_attr_group) based on the original code (against the latest linux-next)?