summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorMathieu Malaterre <malat@debian.org>2018-01-17 12:31:57 +0100
committerJames Hogan <jhogan@kernel.org>2018-01-18 21:59:24 +0000
commit83aa53eb5f34f48e6ff24aee02f879b50c949982 (patch)
tree30230d5b6be6a67e5a3761dbb7582965fdacd4cc /arch/mips
parent2e6522c565522a2e18409c315c49d78c8b74807b (diff)
downloadlinux-83aa53eb5f34f48e6ff24aee02f879b50c949982.tar.gz
linux-83aa53eb5f34f48e6ff24aee02f879b50c949982.tar.bz2
linux-83aa53eb5f34f48e6ff24aee02f879b50c949982.zip
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>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/ftrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c
index 99285be0e088..7f3dfdbc3657 100644
--- a/arch/mips/kernel/ftrace.c
+++ b/arch/mips/kernel/ftrace.c
@@ -361,7 +361,7 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
* If fails when getting the stack address of the non-leaf function's
* ra, stop function graph tracer and return
*/
- if (parent_ra_addr == 0)
+ if (parent_ra_addr == NULL)
goto out;
#endif
/* *parent_ra_addr = return_hooker; */