Re: [PATCH] PnP Fixes for 2.6.0-test5

From: Adam Belay
Date: Sun Sep 21 2003 - 19:20:06 EST


# --------------------------------------------
# 03/09/21 ambx1@xxxxxxxxxx 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/