]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PM / devfreq: fix sscanf handling for writable sysfs entries
authorNishanth Menon <nm@ti.com>
Wed, 24 Oct 2012 00:39:02 +0000 (02:39 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 24 Oct 2012 00:39:02 +0000 (02:39 +0200)
commit5fb6daec42662f1f6e29a9105a8d30b9a0adeaf7
tree091e2dcbb2fcd8d90ff01e7e0de9cfa7b1a6df88
parent2c5c8edaaaab864efe0b432abae2000410a641bc
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: Nishanth Menon <nm@ti.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/devfreq/devfreq.c