From: Axel Lin Date: Fri, 22 Oct 2010 10:29:21 +0000 (+0200) Subject: mfd: Fix a memory leak when unload mc13xxx-core module X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cef92fe63836dcc63db6ccfbea0a6d9255f491a9;p=linux.git mfd: Fix a memory leak when unload mc13xxx-core module Signed-off-by: Axel Lin Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c index 1326e7f4263a7..a2ac2ed6d64c6 100644 --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c @@ -795,6 +795,8 @@ static int __devexit mc13xxx_remove(struct spi_device *spi) mfd_remove_devices(&spi->dev); + kfree(mc13xxx); + return 0; }