Commit 5cf79c29 authored by Samuel Holland's avatar Samuel Holland Committed by Chanwoo Choi
Browse files

PM / devfreq: Strengthen check for freq_table

Since commit ea572f81

 ("PM / devfreq: Change return type of
devfreq_set_freq_table()"), all devfreq devices are expected to have a
valid freq_table. The devfreq core unconditionally dereferences
freq_table in the sysfs code and in get_freq_range().

Therefore, we need to ensure that freq_table is both non-null and
non-empty (length is > 0). If either check fails, replace the table
using set_freq_table() or return the error.

Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 14714135
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment