mirror of https://gitee.com/openkylin/linux.git
sparc/kernel/vio.c: add put_device() after device_find_child()
The vio_remove() function uses device_find_child() but it does not drop the reference of the retrieved child. Signed-off-by: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
150a8dcf10
commit
75e448036b
|
@ -342,6 +342,7 @@ static void vio_remove(struct mdesc_handle *hp, u64 node)
|
|||
printk(KERN_INFO "VIO: Removing device %s\n", dev_name(dev));
|
||||
|
||||
device_unregister(dev);
|
||||
put_device(dev);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue