thermal: int340x: delete bogus length check
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 30 Sep 2021 12:28:03 +0000 (15:28 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 5 Oct 2021 14:46:27 +0000 (16:46 +0200)
commit52628a85dd8eb59dd04df73fc75f40ad85f1d720
treec124b1b2b6e25add21a5427f75bb4d39e54bbb36
parent9e1ff307c779ce1f0f810c7ecce3d95bbae40896
thermal: int340x: delete bogus length check

This check has a signedness bug and does not work.  If "length" is
larger than "PAGE_SIZE" then "PAGE_SIZE - length" is not negative
but instead it is a large unsigned value.  Fortunately, Takashi Iwai
changed this code to use scnprint() instead of snprintf() so now
"length" is never larger than "PAGE_SIZE - 1" and the check can be
removed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/int340x_thermal/int3400_thermal.c