libtracefs: Do not return negative on EAGAIN for tracefs_cpu_flush_write()

Like tracefs_cpu_flush(), when the buffer is empty, and because the
reading of the buffer is done in NON_BLOCK mode, it will finish with a
negative and EAGAIN. This is a successful state, do not return a negative
number here.

Link: https://lore.kernel.org/linux-trace-devel/20221114222024.2435776-2-rostedt@goodmis.org

Fixes: 26b8893efda7c ("libtracefs: Add reading of per cpu files")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 file changed