diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 0ae46048f7248887b3ab334ac3feb9cf4b66ca10..cb2b708e4ea76fee6cd9ca494adeb655adc8daec 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -4954,7 +4954,10 @@ static ssize_t tracing_splice_read_pipe(struct file *filp, spd.nr_pages = i; - ret = splice_to_pipe(pipe, &spd); + if (i) + ret = splice_to_pipe(pipe, &spd); + else + ret = 0; out: splice_shrink_spd(&spd); return ret;