diff options
author | weiping zhang <zhangweiping@didichuxing.com> | 2017-12-21 15:40:43 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2018-02-01 17:26:45 +0300 |
commit | 0063e8bbd2b62d13645d416625478c2199fdee0f (patch) | |
tree | f913958c384c5faaf936626b6764c7e68a971122 /tools/virtio | |
parent | 33635bd976fb4c3ccf0cfbb81a8d29bb87760607 (diff) | |
download | linux-0063e8bbd2b62d13645d416625478c2199fdee0f.tar.xz |
virtio_vop: don't kfree device on register failure
As mentioned at drivers/base/core.c:
/*
* NOTE: _Never_ directly free @dev after calling this function, even
* if it returned an error! Always use put_device() to give up the
* reference initialized in this function instead.
*/
so we don't free vdev until vdev->vdev.dev.release be called.
Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools/virtio')
0 files changed, 0 insertions, 0 deletions