From c650ba7377ad3602b3fad8651ceeec8a20b74b17 Mon Sep 17 00:00:00 2001 From: Tina Ruchandani Date: Sat, 25 Oct 2014 16:35:49 -0700 Subject: [PATCH] Staging: lustre: llite: Simplify error handling This patch fixes the following checkpatch error: ERROR: do not use assignment in if condition 2172: FILE: drivers/staging/lustre/lustre/llite/llite_lib.c:2172: if (!inode || !(sbi = ll_i2sbi(inode))) { Signed-off-by: Tina Ruchandani Suggested-by: Josh Triplett Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/llite/llite_lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 43ab250b087e..74cd4515ac50 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -2169,7 +2169,13 @@ int ll_obd_statfs(struct inode *inode, void *arg) __u32 flags; int len = 0, rc; - if (!inode || !(sbi = ll_i2sbi(inode))) { + if (!inode) { + rc = -EINVAL; + goto out_statfs; + } + + sbi = ll_i2sbi(inode); + if (!sbi) { rc = -EINVAL; goto out_statfs; } -- 2.30.2