All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm-stripe: pay attention to failing registration in dm_stripe_init()
@ 2008-10-31 15:11 Heinz Mauelshagen
  0 siblings, 0 replies; only message in thread
From: Heinz Mauelshagen @ 2008-10-31 15:11 UTC (permalink / raw)
  To: dm-devel; +Cc: heinzm

dm_stripe_init() doesn't pay attention to a failing target registration.

Heinz

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>

---
diff -up linux-2.6.27.4/drivers/md/dm-stripe.c.orig1
linux-2.6.27.4/drivers/md/dm-stripe.c
--- linux-2.6.27.4/drivers/md/dm-stripe.c.orig1	2008-10-26
00:05:07.000000000 +0200
+++ linux-2.6.27.4/drivers/md/dm-stripe.c	2008-10-31 16:05:12.000000000
+0100
@@ -322,12 +322,13 @@ int __init dm_stripe_init(void)
 	r = dm_register_target(&stripe_target);
 	if (r < 0)
 		DMWARN("target registration failed");
-
-	kstriped = create_singlethread_workqueue("kstriped");
-	if (!kstriped) {
-		DMERR("failed to create workqueue kstriped");
-		dm_unregister_target(&stripe_target);
-		return -ENOMEM;
+	else {
+		kstriped = create_singlethread_workqueue("kstriped");
+		if (!kstriped) {
+			DMERR("failed to create workqueue kstriped");
+			dm_unregister_target(&stripe_target);
+			r = -ENOMEM;
+		}
 	}
 
 	return r;

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

only message in thread, other threads:[~2008-10-31 15:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-31 15:11 [PATCH] dm-stripe: pay attention to failing registration in dm_stripe_init() Heinz Mauelshagen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.