Skip to content

Commit 83aa53e

Browse files
malaterreamalon
authored andcommitted
MIPS: ftrace: Remove pointer comparison to 0 in prepare_ftrace_return
Replace pointer comparison to 0 with NULL in prepare_ftrace_return to improve code readability. Identified with coccinelle script 'badzero.cocci'. Signed-off-by: Mathieu Malaterre <malat@debian.org> Reviewed-by: James Hogan <jhogan@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18494/ Signed-off-by: James Hogan <jhogan@kernel.org>
1 parent 2e6522c commit 83aa53e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/kernel/ftrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
361361
* If fails when getting the stack address of the non-leaf function's
362362
* ra, stop function graph tracer and return
363363
*/
364-
if (parent_ra_addr == 0)
364+
if (parent_ra_addr == NULL)
365365
goto out;
366366
#endif
367367
/* *parent_ra_addr = return_hooker; */

0 commit comments

Comments
 (0)