]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PM / devfreq: fix sscanf handling for writable sysfs entries
authorNishanth Menon <nm@ti.com>
Thu, 25 Oct 2012 23:50:43 +0000 (01:50 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 25 Oct 2012 23:50:43 +0000 (01:50 +0200)
commitd84e6b3a260af1fed0b44604c38060443eb5ddde
treed736d03c23c25884599985920914123cb984fb41
parentd81595526ded89ef5d12db2c7bf41b1acdb7e0b0
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