summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ipmi/ipmi_watchdog.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
index 55986e10a124..f78156d93c3f 100644
--- a/drivers/char/ipmi/ipmi_watchdog.c
+++ b/drivers/char/ipmi/ipmi_watchdog.c
@@ -232,12 +232,17 @@ static int set_param_str(const char *val, const struct kernel_param *kp)
static int get_param_str(char *buffer, const struct kernel_param *kp)
{
action_fn fn = (action_fn) kp->arg;
- int rv;
+ int rv, len;
rv = fn(NULL, buffer);
if (rv)
return rv;
- return strlen(buffer);
+
+ len = strlen(buffer);
+ buffer[len++] = '\n';
+ buffer[len] = 0;
+
+ return len;
}