From: Brian Behlendorf Date: Wed, 18 Feb 2009 18:09:01 +0000 (-0800) Subject: Coverity 9656: Forward NULL X-Git-Tag: spl-0.4.3~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02c7f164946e86048721a8c1af6ada3f25c3a78c;p=spl Coverity 9656: Forward NULL This was a false positive the callpath being walked is impossible because the splat_kmem_cache_test_kcp_alloc() function will ensure kcp->kcp_kcd[0] is initialized to NULL. However, there is no harm is making this explicit for the test case so I'm adding a line to clearly set it to correct the analysis. --- diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index c57e280..35718e2 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -548,6 +548,7 @@ splat_kmem_cache_test(struct file *file, void *arg, char *name, return -ENOMEM; } + kcp->kcp_kcd[0] = NULL; kcp->kcp_cache = kmem_cache_create(SPLAT_KMEM_CACHE_NAME, kcp->kcp_size, kcp->kcp_align,