blob: 4ffe4886772b220490df544d62f6004a0d7c861f [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001From 416cee8707053a9015dfec8332e12f8c263098e3 Mon Sep 17 00:00:00 2001
2From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3Date: Thu, 14 Feb 2019 11:40:50 -0500
4Subject: [PATCH 9/9] Cleanup: tp mempool: Remove logically dead code
5
6Found by Coverity:
7CID 1391045 (#1 of 1): Logically dead code (DEADCODE)
8
9Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10
11Upstream-Status: backport https://github.com/lttng/lttng-modules/commit/416cee8707053a9015dfec8332e12f8c263098e3
12
13Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
14---
15 lttng-tp-mempool.c | 11 ++---------
16 1 file changed, 2 insertions(+), 9 deletions(-)
17
18diff --git a/lttng-tp-mempool.c b/lttng-tp-mempool.c
19index d984bd4..21e8376 100644
20--- a/lttng-tp-mempool.c
21+++ b/lttng-tp-mempool.c
22@@ -151,19 +151,12 @@ void lttng_tp_mempool_free(void *ptr)
23 struct lttng_tp_buf_entry *entry;
24 struct per_cpu_buf *cpu_buf;
25
26- if (!ptr) {
27+ if (!ptr)
28 goto end;
29- }
30-
31 entry = container_of(ptr, struct lttng_tp_buf_entry, buf);
32- if (!entry) {
33- goto end;
34- }
35-
36 cpu_buf = per_cpu_ptr(pool, entry->cpu);
37- if (!cpu_buf) {
38+ if (!cpu_buf)
39 goto end;
40- }
41 /* Add it to the free list. */
42 list_add_tail(&entry->list, &cpu_buf->free_list);
43
44--
452.19.1
46