From: Dan Carpenter Date: Thu, 16 Oct 2014 07:56:25 +0000 (+0300) Subject: staging: lustre: silence a static checker warning X-Git-Tag: v5.15~16669^2~712 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92a1daba3a11c027e491c4850dc35163f4a142b1;p=platform%2Fkernel%2Flinux-starfive.git staging: lustre: silence a static checker warning Static checkers warn that if cfs_cpt_table_print() returns an error other than -EFBIG, then it would lead to a double free. This is true but cfs_cpt_table_print() only returns -EFBIG on error so it also won't happen in real life. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c index bbe2c68..83d3f08 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c @@ -365,8 +365,8 @@ static int __proc_cpt_table(void *data, int write, if (rc >= 0) break; - LIBCFS_FREE(buf, len); if (rc == -EFBIG) { + LIBCFS_FREE(buf, len); len <<= 1; continue; }