lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1348074469-1361-1-git-send-email-eduardo.valentin@ti.com>
Date:	Wed, 19 Sep 2012 20:07:49 +0300
From:	Eduardo Valentin <eduardo.valentin@...com>
To:	<gregkh@...uxfoundation.org>
CC:	<b-cousson@...com>, <devel@...verdev.osuosl.org>,
	<linux-kernel@...r.kernel.org>, <linux-omap@...r.kernel.org>,
	Radhesh Fadnis <radhesh.fadnis@...com>,
	Eduardo Valentin <eduardo.valentin@...com>
Subject: [PATCH 1/1] staging: omap-thermal: bandgap: fix setting of alert thresholds

From: Radhesh Fadnis <radhesh.fadnis@...com>

There was an error in check for the valid temperature in
function temp_to_adc_conversion. The temperature value was
compared with higher limit for less than condition as well,
resulting in returning -EINVAL. Corrected the check condition
to properly check for lower and higher temperature limits.

Signed-off-by: Radhesh Fadnis <radhesh.fadnis@...com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@...com>
---
 drivers/staging/omap-thermal/omap-bandgap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c
index ff93c15..368a2e1 100644
--- a/drivers/staging/omap-thermal/omap-bandgap.c
+++ b/drivers/staging/omap-thermal/omap-bandgap.c
@@ -157,7 +157,7 @@ static int temp_to_adc_conversion(long temp, struct omap_bandgap *bg_ptr, int i,
 	high = ts_data->adc_end_val - ts_data->adc_start_val;
 	mid = (high + low) / 2;
 
-	if (temp < bg_ptr->conv_table[high] || temp > bg_ptr->conv_table[high])
+	if (temp < bg_ptr->conv_table[low] || temp > bg_ptr->conv_table[high])
 		return -EINVAL;
 
 	while (low < high) {
-- 
1.7.7.1.488.ge8e1c

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ