lkml.org 
[lkml]   [2003]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] PnP Fixes for 2.6.0-test5
# --------------------------------------------
# 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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.079 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site