[PATCH 1/1] staging: lustre/lustre/obdclass/llog_cat.c: get rid of sparse context imbalance warning

From: Tolga Ceylan
Date: Tue Jun 02 2015 - 15:58:37 EST


In llog_cat_new_log(), sparse emits a context imbalance (unexpected lock)
warning due its inability to detect the noreturn attribute in
lbug_with_lock() function inside LBUG macro. Adding a never reached
return statement suppresses this warning.

Signed-off-by: Tolga Ceylan <tolga.ceylan@xxxxxxxxx>
---
drivers/staging/lustre/lustre/obdclass/llog_cat.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/staging/lustre/lustre/obdclass/llog_cat.c b/drivers/staging/lustre/lustre/obdclass/llog_cat.c
index c8f6ab0..259947c 100644
--- a/drivers/staging/lustre/lustre/obdclass/llog_cat.c
+++ b/drivers/staging/lustre/lustre/obdclass/llog_cat.c
@@ -108,6 +108,7 @@ static int llog_cat_new_log(const struct lu_env *env,
index);
spin_unlock(&loghandle->lgh_hdr_lock);
LBUG(); /* should never happen */
+ return -EINVAL;
}
spin_unlock(&loghandle->lgh_hdr_lock);

--
2.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/