public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Corry <kevcorry@us.ibm.com>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] 2/4: DM: kcopyd.c: make client_add() return void
Date: Wed, 30 Jun 2004 14:57:55 -0500	[thread overview]
Message-ID: <200406301457.55233.kevcorry@us.ibm.com> (raw)
In-Reply-To: <200406301452.16886.kevcorry@us.ibm.com>

kcopyd.c: client_add() can return void instead of an int, which will eliminate
an unnecessary error path in kcopyd_client_create().

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>

--- diff/drivers/md/kcopyd.c	2004-06-30 08:48:15.384847256 -0500
+++ source/drivers/md/kcopyd.c	2004-06-30 08:48:19.528217368 -0500
@@ -573,12 +573,11 @@
 static DECLARE_MUTEX(_client_lock);
 static LIST_HEAD(_clients);
 
-static int client_add(struct kcopyd_client *kc)
+static void client_add(struct kcopyd_client *kc)
 {
 	down(&_client_lock);
 	list_add(&kc->list, &_clients);
 	up(&_client_lock);
-	return 0;
 }
 
 static void client_del(struct kcopyd_client *kc)
@@ -668,15 +667,7 @@
 		return r;
 	}
 
-	r = client_add(kc);
-	if (r) {
-		dm_io_put(nr_pages);
-		client_free_pages(kc);
-		kfree(kc);
-		kcopyd_exit();
-		return r;
-	}
-
+	client_add(kc);
 	*result = kc;
 	return 0;
 }

  parent reply	other threads:[~2004-06-30 19:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-30 19:52 [PATCH] 0/4: Device-Mapper: Minor cleanups and fixes Kevin Corry
2004-06-30 19:57 ` [PATCH] 1/4: DM: kcopyd.c: Remove unused include Kevin Corry
2004-06-30 19:57 ` Kevin Corry [this message]
2004-06-30 19:58 ` [PATCH] 3/4: DM: dm-raid1.c: Enforce max of 9 mirrors Kevin Corry
2004-06-30 19:58 ` [PATCH] 4/4: DM: dm-raid1.c: Use fixed-size arrays Kevin Corry
2004-06-30 20:07   ` Michael Buesch
2004-06-30 20:28     ` Jedi/Sector One

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200406301457.55233.kevcorry@us.ibm.com \
    --to=kevcorry@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox