mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 3/3] staging: lustre: obdclass: fix checking for obd_init_checks()
@ 2017-08-26  6:04 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2017-08-26  6:04 UTC (permalink / raw)
  To: Oleg Drokin
  Cc: Andreas Dilger, James Simmons, Greg Kroah-Hartman, Ben Evans,
	Baoyou Xie, Stephen Champion, frank zago, Henri Doreau,
	lustre-devel, devel, linux-kernel, kernel-janitors

The obd_init_checks() function can either return -EOVERFLOW or -EINVAL
but we accidentally ignore -EINVAL returns.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This patch is the right thing, but it's always a bit risky turning on
new checks and I haven't tested this.

diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 545358923271..2df218b010e1 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -448,7 +448,7 @@ static int __init obdclass_init(void)
 	obd_zombie_impexp_init();
 
 	err = obd_init_checks();
-	if (err == -EOVERFLOW)
+	if (err)
 		return err;
 
 	class_init_uuidlist();

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-26  6:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-26  6:04 [PATCH 3/3] staging: lustre: obdclass: fix checking for obd_init_checks() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®