]> git.baikalelectronics.ru Git - kernel.git/commit
perf python: Fix NULL vs IS_ERR_OR_NULL() checking
authorMiaoqian Lin <linmq006@gmail.com>
Sat, 11 Dec 2021 05:38:53 +0000 (05:38 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 11 Dec 2021 11:23:54 +0000 (08:23 -0300)
commit5daf45f2f67327aa8ebb838d06c47d96e52ca6dd
tree374a250882e60ed2c09f9dfef064d8d78b7f11ca
parent0bb5b75e50c5e21cbc02b799c11489cbd887201e
perf python: Fix NULL vs IS_ERR_OR_NULL() checking

The function trace_event__tp_format_id may return ERR_PTR(-ENOMEM).  Use
IS_ERR_OR_NULL to check tp_format.

Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <song@kernel.org>
Link: http://lore.kernel.org/lkml/20211211053856.19827-1-linmq006@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/python.c