Commit 92a1daba authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 22e1dd69
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment