misc: nct1008: avoid reading bogus temperature
authorDiwakar Tundlam <dtundlam@nvidia.com>
Tue, 4 Mar 2014 02:11:34 +0000 (18:11 -0800)
committerMatthew Pedro <mapedro@nvidia.com>
Fri, 4 Apr 2014 21:37:36 +0000 (14:37 -0700)
commit076b99cb4612e2259efa8e7e3747e6743a00b3b1
tree829796c52072617d04b221b623436b78c9a43cf6
parent946eeb008b93347b59dc23b16e4d0e90b16fc560
misc: nct1008: avoid reading bogus temperature

Added a check for temperature above max value and return error when
that happens to avoid showing insane temperature values to user. Bogus
temperature readout happens rarely due to the NCT device still being
initialized and unprepared while interrupts happen.

Based on commit 707c55d46a9c9f3780caa64426efa8220be11a1e which was
reviewed-on: http://git-master/r/376832

Bug 1454792

Change-Id: I7f31f80f47abc197e6dda3d661dfb82e946ea039
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/392045
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
drivers/misc/nct1008.c