From: YueHaibing <yuehaibing@huawei.com> To: <jk@ozlabs.org>, <joel@jms.id.au>, <eajames@linux.ibm.com>, <andrew@aj.id.au> Cc: <alistair@popple.id.au>, <linux-fsi@lists.ozlabs.org>, <linux-arm-kernel@lists.infradead.org>, <linux-aspeed@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>, <gregkh@linuxfoundation.org>, YueHaibing <yuehaibing@huawei.com> Subject: [PATCH v2 -next] fsi: aspeed: Use devm_kfree in aspeed_master_release() Date: Sat, 9 Nov 2019 11:36:34 +0800 [thread overview] Message-ID: <20191109033634.30544-1-yuehaibing@huawei.com> (raw) In-Reply-To: <20191109033209.45244-1-yuehaibing@huawei.com> '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@huawei.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
WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com> To: <jk@ozlabs.org>, <joel@jms.id.au>, <eajames@linux.ibm.com>, <andrew@aj.id.au> Cc: linux-aspeed@lists.ozlabs.org, alistair@popple.id.au, YueHaibing <yuehaibing@huawei.com>, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-fsi@lists.ozlabs.org Subject: [PATCH v2 -next] fsi: aspeed: Use devm_kfree in aspeed_master_release() Date: Sat, 9 Nov 2019 11:36:34 +0800 [thread overview] Message-ID: <20191109033634.30544-1-yuehaibing@huawei.com> (raw) In-Reply-To: <20191109033209.45244-1-yuehaibing@huawei.com> '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@huawei.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-11-09 3:37 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-09 3:32 [PATCH -next] fsi: aspeed: Use devm_kfree in aspeed_master_release() YueHaibing 2019-11-09 3:32 ` YueHaibing 2019-11-09 3:36 ` YueHaibing [this message] 2019-11-09 3:36 ` [PATCH v2 " YueHaibing 2019-11-11 14:17 ` Guenter Roeck 2019-11-11 14:17 ` Guenter Roeck 2019-11-12 3:47 ` [PATCH v3 -next] fsi: aspeed: Fix aspeed device free YueHaibing 2019-11-12 3:47 ` YueHaibing 2019-11-11 14:16 ` [PATCH -next] fsi: aspeed: Use devm_kfree in aspeed_master_release() Guenter Roeck 2019-11-11 14:16 ` Guenter Roeck
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191109033634.30544-1-yuehaibing@huawei.com \ --to=yuehaibing@huawei.com \ --cc=alistair@popple.id.au \ --cc=andrew@aj.id.au \ --cc=eajames@linux.ibm.com \ --cc=gregkh@linuxfoundation.org \ --cc=jk@ozlabs.org \ --cc=joel@jms.id.au \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-aspeed@lists.ozlabs.org \ --cc=linux-fsi@lists.ozlabs.org \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.