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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux