diff options
author | Arnaldo Carvalho de Melo | 2017-02-15 14:06:20 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo | 2017-02-15 14:06:20 +0100 |
commit | b30a7d1fc96d60fe2c02e375a56a046385701d17 (patch) | |
tree | 38cfab671653991a5c6c925d5c9946c27acab8d9 /kernel/membarrier.c | |
parent | perf tools: Be consistent on the type of map->symbols[] interator (diff) | |
download | kernel-qcow2-linux-b30a7d1fc96d60fe2c02e375a56a046385701d17.tar.gz kernel-qcow2-linux-b30a7d1fc96d60fe2c02e375a56a046385701d17.tar.xz kernel-qcow2-linux-b30a7d1fc96d60fe2c02e375a56a046385701d17.zip |
perf pmu: Fix check for unset alias->unit array
The alias->unit field is an array, so to check that it is not set we
should see if it is an empty string, i.e. alias->unit[0], instead of
checking alias->unit != NULL, as this will _always_ evaluate to 'true'.
Pointed out by clang.
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20170214182435.GD4458@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'kernel/membarrier.c')
0 files changed, 0 insertions, 0 deletions