All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Belay <ambx1@neo.rr.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PnP Fixes for 2.6.0-test5
Date: Sun, 21 Sep 2003 20:10:12 +0000	[thread overview]
Message-ID: <20030921201012.GC24897@neo.rr.com> (raw)
In-Reply-To: <20030921200935.GB24897@neo.rr.com>

# --------------------------------------------
# 03/09/21	ambx1@neo.rr.com	1.1355
# [PNP] release card devices on probe failure
# 
# When a driver's probe routine fails, it may not release all of the
# card devices it requested.  This patch allows the pnp layer to ensure
# that all devices claimed by the failing driver are released properly.
# --------------------------------------------
#
diff -Nru a/drivers/pnp/card.c b/drivers/pnp/card.c
--- a/drivers/pnp/card.c	Sun Sep 21 19:46:10 2003
+++ b/drivers/pnp/card.c	Sun Sep 21 19:46:10 2003
@@ -62,8 +62,14 @@
 		if (drv->probe) {
 			if (drv->probe(clink, id)>=0)
 				return 1;
-			else
+			else {
+				struct pnp_dev * dev;
+				card_for_each_dev(card, dev) {
+					if (dev->card_link == clink)
+						pnp_release_card_device(dev);
+				}
 				kfree(clink);
+			}
 		} else
 			return 1;
 	}

  reply	other threads:[~2003-09-22  0:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-21 20:09 [PATCH] PnP Fixes for 2.6.0-test5 Adam Belay
2003-09-21 20:10 ` Adam Belay [this message]
2003-09-21 20:10 ` Adam Belay
2003-09-21 20:11 ` Adam Belay
2003-09-22 11:32   ` Alan Cox
2003-09-24 16:25     ` Adam Belay
2003-09-21 20:11 ` Adam Belay
2003-09-21 20:12 ` Adam Belay
2003-09-21 20:12 ` Adam Belay
2003-09-21 20:13 ` Adam Belay

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=20030921201012.GC24897@neo.rr.com \
    --to=ambx1@neo.rr.com \
    --cc=linux-kernel@vger.kernel.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 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.