[PATCH] mfd: Fix a memory leak when unload mc13xxx-core module

From: Axel Lin
Date: Thu Oct 21 2010 - 20:40:22 EST


Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
---
drivers/mfd/mc13xxx-core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index 1326e7f..f397329 100644
--- a/drivers/mfd/mc13xxx-core.c
+++ b/drivers/mfd/mc13xxx-core.c
@@ -792,8 +792,8 @@ static int __devexit mc13xxx_remove(struct spi_device *spi)
struct mc13xxx *mc13xxx = dev_get_drvdata(&spi->dev);

free_irq(mc13xxx->spidev->irq, mc13xxx);
-
mfd_remove_devices(&spi->dev);
+ kfree(mc13xxx);

return 0;
}
--
1.7.2



--
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/