soc: qcom: Avoid accessing invalid CPU ids
While getting input for min and max freq from userspace,
checking against just the number of present CPUs can
cause an access to an invalid CPU id if the userspace
input is not properly constructed for a particular
target. This change prevents that from happening by
checking against num_present_cpus() - 1 so that
invalid CPU ids are not considered while accepting
input from userspace.
Change-Id: I9e52a175ff8ea9448a0676695a63ffddfa12419e
Signed-off-by:
Pracheer <pracheer@codeaurora.org>
Loading
Please register or sign in to comment