Skip to contentSkip to conversation

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

PATCH New Axel Lin 1 participant 1 message Oct 22, 2010 Multifunction devices (MFD)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 mfd: Fix a memory leak when unload mc13xxx-core module

---
 drivers/mfd/mc13xxx-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mfd/mc13xxx-core.c +1 -1
index 1326e7f..f397329 100644
@@ -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;
 }
Signature · 1 line
1.7.2