]> git.karo-electronics.de Git - linux-beck.git/commitdiff
tracing: Fix return value of tracing_stats_read()
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 11 Nov 2009 21:26:35 +0000 (22:26 +0100)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 12 Nov 2009 02:26:55 +0000 (21:26 -0500)
The function tracing_stats_read() mistakenly returns ENOMEM instead
of the negative value -ENOMEM.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
LKML-Reference: <4AFB2C0B.50605@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c

index b20d3ec75de9c6f505e5a591d7d746013b88d6db..03c7fd55c5f9ee723057f1968d15bc42f7eaac02 100644 (file)
@@ -3730,7 +3730,7 @@ tracing_stats_read(struct file *filp, char __user *ubuf,
 
        s = kmalloc(sizeof(*s), GFP_KERNEL);
        if (!s)
-               return ENOMEM;
+               return -ENOMEM;
 
        trace_seq_init(s);