* [PATCH] vfio/fsl-mc: Remove unnecessary free in vfio_set_trigger
@ 2024-01-12 7:21 Kunwu Chan
2024-01-12 15:35 ` Alex Williamson
0 siblings, 1 reply; 2+ messages in thread
From: Kunwu Chan @ 2024-01-12 7:21 UTC (permalink / raw)
To: diana.craciun, alex.williamson
Cc: eric.auger, Bharat.Bhushan, kvm, linux-kernel, Kunwu Chan
'irq->name' is initialed by kasprintf, so there is no need
to free it before initializing.
Fixes: cc0ee20bd969 ("vfio/fsl-mc: trigger an interrupt via eventfd")
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c b/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
index d62fbfff20b8..31f0716e7ab3 100644
--- a/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
+++ b/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
@@ -69,7 +69,6 @@ static int vfio_set_trigger(struct vfio_fsl_mc_device *vdev,
hwirq = vdev->mc_dev->irqs[index]->virq;
if (irq->trigger) {
free_irq(hwirq, irq);
- kfree(irq->name);
eventfd_ctx_put(irq->trigger);
irq->trigger = NULL;
}
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] vfio/fsl-mc: Remove unnecessary free in vfio_set_trigger
2024-01-12 7:21 [PATCH] vfio/fsl-mc: Remove unnecessary free in vfio_set_trigger Kunwu Chan
@ 2024-01-12 15:35 ` Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2024-01-12 15:35 UTC (permalink / raw)
To: Kunwu Chan; +Cc: diana.craciun, eric.auger, Bharat.Bhushan, kvm, linux-kernel
On Fri, 12 Jan 2024 15:21:28 +0800
Kunwu Chan <chentao@kylinos.cn> wrote:
> 'irq->name' is initialed by kasprintf, so there is no need
> to free it before initializing.
This is just as bogus as the vfio-platform version. Thanks,
Alex
> Fixes: cc0ee20bd969 ("vfio/fsl-mc: trigger an interrupt via eventfd")
> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
> ---
> drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c b/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
> index d62fbfff20b8..31f0716e7ab3 100644
> --- a/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
> +++ b/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
> @@ -69,7 +69,6 @@ static int vfio_set_trigger(struct vfio_fsl_mc_device *vdev,
> hwirq = vdev->mc_dev->irqs[index]->virq;
> if (irq->trigger) {
> free_irq(hwirq, irq);
> - kfree(irq->name);
> eventfd_ctx_put(irq->trigger);
> irq->trigger = NULL;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-12 15:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-12 7:21 [PATCH] vfio/fsl-mc: Remove unnecessary free in vfio_set_trigger Kunwu Chan
2024-01-12 15:35 ` Alex Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox