]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/ipmi/ipmi_watchdog.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
[linux-2.6-omap-h63xx.git] / drivers / char / ipmi / ipmi_watchdog.c
index 78280380a905ff82bbb49644f80b9926d5809ed1..41f78e2c158f453543ba8d315df7d0b580efa341 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/miscdevice.h>
 #include <linux/init.h>
 #include <linux/completion.h>
+#include <linux/kdebug.h>
 #include <linux/rwsem.h>
 #include <linux/errno.h>
 #include <asm/uaccess.h>
@@ -50,6 +51,7 @@
 #include <linux/string.h>
 #include <linux/ctype.h>
 #include <asm/atomic.h>
+
 #ifdef CONFIG_X86_LOCAL_APIC
 #include <asm/apic.h>
 #endif
@@ -216,13 +218,13 @@ static int set_param_str(const char *val, struct kernel_param *kp)
 {
        action_fn  fn = (action_fn) kp->arg;
        int        rv = 0;
-       char       *dup, *s;
+       char       valcp[16];
+       char       *s;
 
-       dup = kstrdup(val, GFP_KERNEL);
-       if (!dup)
-               return -ENOMEM;
+       strncpy(valcp, val, 16);
+       valcp[15] = '\0';
 
-       s = strstrip(dup);
+       s = strstrip(valcp);
 
        down_read(&register_sem);
        rv = fn(s, NULL);
@@ -235,7 +237,6 @@ static int set_param_str(const char *val, struct kernel_param *kp)
 
  out_unlock:
        up_read(&register_sem);
-       kfree(dup);
        return rv;
 }