vme: remove unneeded kfree
authorDing Xiang <dingxiang@cmss.chinamobile.com>
Thu, 6 Sep 2018 08:51:10 +0000 (16:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Sep 2018 13:25:57 +0000 (15:25 +0200)
put_device will call vme_dev_release to free vdev, kfree is
unnecessary here.

Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vme/vme.c

index 92500f6bdad194689e43ae630ce7d2147bde2694..520a5f9c27ded4a50cb59542aba78ea903362ec6 100644 (file)
@@ -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);