ARM: tegra: fuse: Fix sysfs output
Animesh Kishore [Mon, 2 Jul 2012 12:45:46 +0000 (17:45 +0530)]
Adding extra byte for null character. Without this
string concatenation of fuse read will be erratic.

Bug 1007619

Change-Id: Idbb5f997840f5ed27418d5b0b8dfbc9516354f4c
Signed-off-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-on: http://git-master/r/112974
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

arch/arm/mach-tegra/tegra_odm_fuses.c

index 5dcf24e..06b831c 100644 (file)
@@ -885,7 +885,7 @@ static ssize_t fuse_show(struct kobject *kobj, struct kobj_attribute *attr, char
 {
        enum fuse_io_param param = fuse_name_to_param(attr->attr.name);
        u32 data[8];
-       char str[8];
+       char str[9]; /* extra byte for null character */
        int ret, i;
 
        if ((param == -1) || (param == -ENODATA)) {