[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191109033634.30544-1-yuehaibing@huawei.com>
Date: Sat, 9 Nov 2019 11:36:34 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <jk@...abs.org>, <joel@....id.au>, <eajames@...ux.ibm.com>,
<andrew@...id.au>
CC: <alistair@...ple.id.au>, <linux-fsi@...ts.ozlabs.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-aspeed@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
<gregkh@...uxfoundation.org>, YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH v2 -next] fsi: aspeed: Use devm_kfree in aspeed_master_release()
'aspeed' is allocated by devm_kzalloc(), it should not be
freed by kfree().
Fixes: 1edac1269c02 ("fsi: Add ast2600 master driver")
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
v2: fix log typos
---
drivers/fsi/fsi-master-aspeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/fsi/fsi-master-aspeed.c b/drivers/fsi/fsi-master-aspeed.c
index 3dd82dd..0f63eec 100644
--- a/drivers/fsi/fsi-master-aspeed.c
+++ b/drivers/fsi/fsi-master-aspeed.c
@@ -361,7 +361,7 @@ static void aspeed_master_release(struct device *dev)
struct fsi_master_aspeed *aspeed =
to_fsi_master_aspeed(dev_to_fsi_master(dev));
- kfree(aspeed);
+ devm_kfree(dev, aspeed);
}
/* mmode encoders */
--
2.7.4
Powered by blists - more mailing lists