Skip to content
Commit 12e26265 authored by Nishanth Menon's avatar Nishanth Menon Committed by Rafael J. Wysocki
Browse files

PM / devfreq: fix sscanf handling for writable sysfs entries



sscanf returns 0 when an invalid parameter like:
echo -n "a">min_freq
is attempted. Returning back the return result(0) will
cause the command not to return back to command
prompt.

Instead, just return -EINVAL when sscanf does not
return 1.

This is done for min_freq, max_freq and polling_interval

Signed-off-by: default avatarNishanth Menon <nm@ti.com>
Acked-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent c5b4a1c1
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