Re: [PATCH v2 04/14] vfio/platform: Use vfio_init/register/unregister_group_dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 16, 2021 at 03:33:55PM -0600, Alex Williamson wrote:

> >  static int vfio_platform_remove(struct platform_device *pdev)
> >  {
> > -	struct vfio_platform_device *vdev;
> > -
> > -	vdev = vfio_platform_remove_common(&pdev->dev);
> > -	if (vdev) {
> > -		kfree(vdev);
> > -		return 0;
> > -	}
> > +	struct vfio_platform_device *vdev = dev_get_drvdata(&pdev->dev);
> >  
> > -	return -EINVAL;
> > +	vfio_platform_remove_common(vdev);
> > +	kfree(vdev->name);
> 
> 
> We don't own that to free it, _probe set this via:
> 
>         vdev->name = pdev->name;

Gah, yes, this is a copy&pasto mistake from the amba code

Thanks,
Jason



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux