LKML Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH -next] fsi: aspeed: Use devm_kfree in aspeed_master_release()
@ 2019-11-09  3:32 YueHaibing
  2019-11-09  3:36 ` [PATCH v2 " YueHaibing
  2019-11-11 14:16 ` [PATCH -next] fsi: aspeed: Use devm_kfree in aspeed_master_release() Guenter Roeck
  0 siblings, 2 replies; 5+ messages in thread
From: YueHaibing @ 2019-11-09  3:32 UTC (permalink / raw)
  To: jk, joel, eajames, andrew
  Cc: alistair, linux-fsi, linux-arm-kernel, linux-aspeed,
	linux-kernel, gregkh, YueHaibing

'aspeed' is allocted by devm_kfree(), it should not be
freed bt kfree().

Fixes: 1edac1269c02 ("fsi: Add ast2600 master driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-09  3:32 [PATCH -next] fsi: aspeed: Use devm_kfree in aspeed_master_release() YueHaibing
2019-11-09  3:36 ` [PATCH v2 " YueHaibing
2019-11-11 14:17   ` Guenter Roeck
2019-11-12  3:47   ` [PATCH v3 -next] fsi: aspeed: Fix aspeed device free YueHaibing
2019-11-11 14:16 ` [PATCH -next] fsi: aspeed: Use devm_kfree in aspeed_master_release() Guenter Roeck

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git