diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index e255f1f9e26c..0930919b5915 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -1202,8 +1202,9 @@ info_debugfs_read(struct file *file, char __user *buf, /* if the read fails, then -1 will be returned */ totalBytes = info_debugfs_read_helper(&temp, &remaining_bytes); ProcReadBufferValid = 1; - } else + } else { totalBytes = strlen(ProcReadBuffer); + } return simple_read_from_buffer(buf, len, offset, ProcReadBuffer, totalBytes);