diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-10-16 10:56:25 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-29 16:25:23 +0800 |
commit | 92a1daba3a11c027e491c4850dc35163f4a142b1 (patch) | |
tree | 8d7b6a5fd9bf364271df691613ca9f2c951e896c /drivers/staging/lustre | |
parent | 22e1dd69fec2f0e887103f6b0dc8e310f649c1c1 (diff) | |
download | op-kernel-dev-92a1daba3a11c027e491c4850dc35163f4a142b1.zip op-kernel-dev-92a1daba3a11c027e491c4850dc35163f4a142b1.tar.gz |
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 <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r-- | drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |