Commit bc76f57
committed
cpufreq: amd-pstate: Don't create attributes when registration fails
If driver registration fails then immediately return the failure
instead of continuing to register attributes.
This fixes issues of falling back from amd-pstate to other drivers
when cpufreq init has failed for any reason.
Reported-by: alex.s.cochran@proton.me
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Reviewed-by: Perry Yuan <Perry.Yuan@amd.com>
Link: https://lore.kernel.org/r/20240623200918.52104-1-mario.limonciello@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>1 parent e1a921f commit bc76f57
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1863 | 1863 | | |
1864 | 1864 | | |
1865 | 1865 | | |
1866 | | - | |
| 1866 | + | |
1867 | 1867 | | |
| 1868 | + | |
| 1869 | + | |
1868 | 1870 | | |
1869 | 1871 | | |
1870 | 1872 | | |
| |||
1880 | 1882 | | |
1881 | 1883 | | |
1882 | 1884 | | |
| 1885 | + | |
| 1886 | + | |
1883 | 1887 | | |
1884 | 1888 | | |
1885 | 1889 | | |
| |||
0 commit comments