[linux-yocto] [PATCH 05/26] char: hwrng: kstrtoint argument updated for base
Daniel Dragomir
daniel.dragomir at windriver.com
Wed Nov 16 08:56:41 PST 2016
From: Sreedevi Joshi <sreedevi.joshi at intel.com>
kstrtoint was being used to parse user input and set
trng_test_mode driver parameter. The base was set to
1 earlier. This is causing issues. Base passed is now
changed to 0 - to autodetect which will help in
addressing all bases correctly.
Signed-off-by: Sreedevi Joshi <sreedevi.joshi at intel.com>
---
drivers/char/hw_random/axxia-rng.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char/hw_random/axxia-rng.c b/drivers/char/hw_random/axxia-rng.c
index 15121fd..7790493 100644
--- a/drivers/char/hw_random/axxia-rng.c
+++ b/drivers/char/hw_random/axxia-rng.c
@@ -431,11 +431,10 @@ static ssize_t trng_attr_testmode_store(struct device_driver *drv,
const char *buf, size_t count)
{
try_module_get(THIS_MODULE);
- if (kstrtoint(buf, 1, &trng_test_mode) < 0) {
+ if (kstrtoint(buf, 0, &trng_test_mode) < 0) {
module_put(THIS_MODULE);
return -EFAULT;
}
-
module_put(THIS_MODULE);
return count;
}
--
2.7.4
More information about the linux-yocto
mailing list