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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1291571382-2719-37-git-send-email-adobriyan@gmail.com>
Date:	Sun,  5 Dec 2010 19:49:34 +0200
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	akpm@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org, Alexey Dobriyan <adobriyan@...il.com>
Subject: [PATCH 37/45] kstrtox: convert drivers/regulator/


Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---
 drivers/regulator/virtual.c |   32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/drivers/regulator/virtual.c b/drivers/regulator/virtual.c
index 69e550f..6e3eee2 100644
--- a/drivers/regulator/virtual.c
+++ b/drivers/regulator/virtual.c
@@ -118,10 +118,12 @@ static ssize_t set_min_uV(struct device *dev, struct device_attribute *attr,
 			  const char *buf, size_t count)
 {
 	struct virtual_consumer_data *data = dev_get_drvdata(dev);
-	long val;
+	int val;
+	int rv;
 
-	if (strict_strtol(buf, 10, &val) != 0)
-		return count;
+	rv = kstrtoint(buf, 10, &val);
+	if (rv < 0)
+		return rv;
 
 	mutex_lock(&data->lock);
 
@@ -144,10 +146,12 @@ static ssize_t set_max_uV(struct device *dev, struct device_attribute *attr,
 			  const char *buf, size_t count)
 {
 	struct virtual_consumer_data *data = dev_get_drvdata(dev);
-	long val;
+	int val;
+	int rv;
 
-	if (strict_strtol(buf, 10, &val) != 0)
-		return count;
+	rv = kstrtoint(buf, 10, &val);
+	if (rv < 0)
+		return rv;
 
 	mutex_lock(&data->lock);
 
@@ -170,10 +174,12 @@ static ssize_t set_min_uA(struct device *dev, struct device_attribute *attr,
 			  const char *buf, size_t count)
 {
 	struct virtual_consumer_data *data = dev_get_drvdata(dev);
-	long val;
+	int val;
+	int rv;
 
-	if (strict_strtol(buf, 10, &val) != 0)
-		return count;
+	rv = kstrtoint(buf, 10, &val);
+	if (rv < 0)
+		return rv;
 
 	mutex_lock(&data->lock);
 
@@ -196,10 +202,12 @@ static ssize_t set_max_uA(struct device *dev, struct device_attribute *attr,
 			  const char *buf, size_t count)
 {
 	struct virtual_consumer_data *data = dev_get_drvdata(dev);
-	long val;
+	int val;
+	int rv;
 
-	if (strict_strtol(buf, 10, &val) != 0)
-		return count;
+	rv = kstrtoint(buf, 10, &val);
+	if (rv < 0)
+		return rv;
 
 	mutex_lock(&data->lock);
 
-- 
1.7.2.2

--
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