From: Barry Song <[email protected]>

Signed-off-by: Barry Song <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/staging/iio/Documentation/iio_utils.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/Documentation/iio_utils.h 
b/drivers/staging/iio/Documentation/iio_utils.h
index a4555e6..014f668 100644
--- a/drivers/staging/iio/Documentation/iio_utils.h
+++ b/drivers/staging/iio/Documentation/iio_utils.h
@@ -62,9 +62,8 @@ inline int find_type_by_name(const char *name, const char 
*type)
                                        1) != 0) {
                                filename = malloc(strlen(iio_dir)
                                                + strlen(type)
-                                               + 1
                                                + numstrlen
-                                               + 1);
+                                               + 6);
                                if (filename == NULL)
                                        return -ENOMEM;
                                sprintf(filename, "%s%s%d/name",
-- 
1.7.1

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to