Cleanup: tp mempool: Remove logically dead code
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 14 Feb 2019 16:40:50 +0000 (11:40 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 14 Feb 2019 16:40:50 +0000 (11:40 -0500)
Found by Coverity:
CID 1391045 (#1 of 1): Logically dead code (DEADCODE)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-tp-mempool.c

index 9db6046b7c7813b97cd3a4f854696fa690ec0f69..da476c5ec299920d8312781c53ce60fd3f32ea09 100644 (file)
@@ -138,19 +138,12 @@ void lttng_tp_mempool_free(void *ptr)
        struct lttng_tp_buf_entry *entry;
        struct per_cpu_buf *cpu_buf;
 
-       if (!ptr) {
+       if (!ptr)
                goto end;
-       }
-
        entry = container_of(ptr, struct lttng_tp_buf_entry, buf);
-       if (!entry) {
-               goto end;
-       }
-
        cpu_buf = per_cpu_ptr(pool, entry->cpu);
-       if (!cpu_buf) {
+       if (!cpu_buf)
                goto end;
-       }
        /* Add it to the free list. */
        list_add_tail(&entry->list, &cpu_buf->free_list);
 
This page took 0.025157 seconds and 4 git commands to generate.