From: Mathieu Desnoyers Date: Fri, 9 Dec 2011 14:26:06 +0000 (-0500) Subject: lttng lib: ring buffer remove duplicate null pointer X-Git-Tag: v2.0-pre11~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1deffc9b1233b244190924ebd315db7b3c802f85;p=lttng-modules.git lttng lib: ring buffer remove duplicate null pointer This check is performed at mapping setup time in lib_ring_buffer_mmap_buf() already, so we can safely remove this duplicata. Reported-by: Dan Carpenter Signed-off-by: Mathieu Desnoyers --- diff --git a/lib/ringbuffer/ring_buffer_mmap.c b/lib/ringbuffer/ring_buffer_mmap.c index 68221ee9..cf374348 100644 --- a/lib/ringbuffer/ring_buffer_mmap.c +++ b/lib/ringbuffer/ring_buffer_mmap.c @@ -30,9 +30,6 @@ static int lib_ring_buffer_fault(struct vm_area_struct *vma, struct vm_fault *vm void **virt; unsigned long offset, sb_bindex; - if (!buf) - return VM_FAULT_OOM; - /* * Verify that faults are only done on the range of pages owned by the * reader.