put_device will call vme_dev_release to free vdev, kfree is unnecessary here. Signed-off-by: Ding Xiang <dingxiang@xxxxxxxxxxxxxxxxxxxx> --- drivers/vme/vme.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c index 92500f6..520a5f9 100644 --- a/drivers/vme/vme.c +++ b/drivers/vme/vme.c @@ -1890,7 +1890,6 @@ static int __vme_register_driver_bus(struct vme_driver *drv, err_reg: put_device(&vdev->dev); - kfree(vdev); err_devalloc: list_for_each_entry_safe(vdev, tmp, &drv->devices, drv_list) { list_del(&vdev->drv_list); -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel