On Tue, Mar 16, 2021 at 03:33:55PM -0600, Alex Williamson wrote:
quoted
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