summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Correia Villa Real <lucasvr@terra.com.br>2002-09-17 06:44:07 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-09-17 06:44:07 -0700
commitdb2787b45d006b6a0b41cfc787d8081b1eef3be6 (patch)
tree4bf0d5f039fea1b657765b84d8ad63ccae9f9b66
parent87650f2a74ce9e6768f8f5188f830d35ed58f3e8 (diff)
[PATCH] 2.5.31_drivers_i2c_i2c-philips-par.c
This is a trivial patch already applied in the -ac tree for the 2.4.19 kernel. Patch for i2c-philips-par.c free() the memory in the case of problems loading the adapter.
-rw-r--r--drivers/i2c/i2c-philips-par.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-philips-par.c b/drivers/i2c/i2c-philips-par.c
index 76c9320d3ba8..c26e74304724 100644
--- a/drivers/i2c/i2c-philips-par.c
+++ b/drivers/i2c/i2c-philips-par.c
@@ -201,6 +201,7 @@ static void i2c_parport_attach (struct parport *port)
NULL);
if (!adapter->pdev) {
printk(KERN_ERR "i2c-philips-par: Unable to register with parport.\n");
+ kfree(adapter);
return;
}
@@ -211,6 +212,7 @@ static void i2c_parport_attach (struct parport *port)
if (parport_claim_or_block(adapter->pdev) < 0 ) {
printk(KERN_ERR "i2c-philips-par: Could not claim parallel port.\n");
+ kfree(adapter);
return;
}
/* reset hardware to sane state */