diff options
author | Emilio G. Cota <cota@braap.org> | 2013-02-13 18:47:54 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-14 17:24:14 (GMT) |
commit | def1820d25fa93cf5fca10bf45f22cdb11be41f2 (patch) | |
tree | e4e6dcea68b002815b34a1c17b55df59937fd60f /drivers/vme/vme.c | |
parent | 40262275f0b1bd2f0cbf9453c89c8a16025932ef (diff) | |
download | linux-fsl-qoriq-def1820d25fa93cf5fca10bf45f22cdb11be41f2.tar.xz |
vme: add missing put_device() after device_register() fails
put_device() must be called after device_register() fails,
since device_register() always initializes the refcount
on the device structure.
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/vme/vme.c')
-rw-r--r-- | drivers/vme/vme.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c index 95a9f71..5e6c7d7 100644 --- a/drivers/vme/vme.c +++ b/drivers/vme/vme.c @@ -1376,6 +1376,7 @@ static int __vme_register_driver_bus(struct vme_driver *drv, return 0; err_reg: + put_device(&vdev->dev); kfree(vdev); err_devalloc: list_for_each_entry_safe(vdev, tmp, &drv->devices, drv_list) { |