]> git.karo-electronics.de Git - linux-beck.git/commit
thermal: core: treat correctly the return value of *scanf calls
authorEduardo Valentin <edubezval@gmail.com>
Tue, 8 Nov 2016 05:08:58 +0000 (21:08 -0800)
committerZhang Rui <rui.zhang@intel.com>
Wed, 23 Nov 2016 02:06:12 +0000 (10:06 +0800)
commit09544da9e8255ef0f3aafd1e7da067dd2b521b40
tree5bb3689c75c1a73a6a2d4ae9f1210fca594aea7d
parentba78da443bd5cae5079d2b1e8174d3a3cb040adb
thermal: core: treat correctly the return value of *scanf calls

This patch checks the return value of all calls to *scanf.
The check is to simply match the number of expect inputs.

The current code does not do any recovery in case the
number of treated inputs are different than the expected.
Therefore, keeping the same behavior.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/thermal_core.c