diff options
author | Namhyung Kim <namhyung@kernel.org> | 2024-06-21 10:05:27 -0700 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2024-06-25 11:06:20 -0700 |
commit | 0eb739d87f1b4780af0168e479d87627a33b6e3d (patch) | |
tree | 30f54be0a1b6dff33ed6bba906a0577f315088b3 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | e988a5b53ebd40c2fafc86250e95d69929796fbd (diff) | |
download | linux-0eb739d87f1b4780af0168e479d87627a33b6e3d.tar.gz linux-0eb739d87f1b4780af0168e479d87627a33b6e3d.tar.bz2 linux-0eb739d87f1b4780af0168e479d87627a33b6e3d.zip |
perf tools: Fix a compiler warning of NULL pointer
A compiler warning on the second argument of bsearch() should not be
NULL, but there's a case we might pass it. Let's return early if we
don't have any DSOs to search in __dsos__find_by_longname_id().
util/dsos.c:184:8: runtime error: null pointer passed as argument 2, which is declared to never be null
Reported-by: kernel test robot <oliver.sang@intel.com>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Closes: https://lore.kernel.org/oe-lkp/202406180932.84be448c-oliver.sang@intel.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240621170528.608772-4-namhyung@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions