Skip to content
Commit f57af6df authored by Chunyan Zhang's avatar Chunyan Zhang Committed by Alexander Shishkin
Browse files

stm class: Fix integer boundary checks for master range



Master IDs are of unsigned int type, yet in the configfs policy code
we're validating user's input against INT_MAX. This is both pointless
and misleading as the real limits are imposed by the stm device's
[sw_start..sw_end] (which are also limited by the spec to be no larger
than 2^16-1).

Clean this up by getting rid of the redundant comparisons.

Signed-off-by: default avatarChunyan Zhang <zhang.chunyan@linaro.org>
Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: default avatarLaurent Fert <laurent.fert@intel.com>
parent e787bc46
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