perf/core: Remove a redundant check
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Tue, 7 Jun 2016 12:44:15 +0000 (15:44 +0300)
committerIngo Molnar <mingo@kernel.org>
Wed, 8 Jun 2016 12:30:01 +0000 (14:30 +0200)
commit62a92c8f553e49270a0ee391b8733da71ab0aebc
tree17bec040a63d2e20a8e245b970d5188bf682e445
parent3b94a891667c30fb4624221497d77fc65d950345
perf/core: Remove a redundant check

There is no way to end up in _free_event() with event::pmu being NULL.
The latter is initialized in event allocation path and remains set
forever. In case of allocation failure, the error path doesn't use
_free_event().

Having the check, however, suggests that it is possible to have a
event::pmu==NULL situation in _free_event() and confuses the robots.

This patch gets rid of the check.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: eranian@google.com
Cc: vince@deater.net
Link: http://lkml.kernel.org/r/1465303455-26032-1-git-send-email-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c