linux-stable/drivers/virtio
weiping zhang 33635bd976 virtio_pci: 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 vp_dev until vp_dev->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>
2018-02-01 16:26:45 +02:00
..
Kconfig virtio: make VIRTIO a menuconfig to ease disabling it all 2018-02-01 16:26:43 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
virtio.c virtio: split device_register into device_initialize and device_add 2018-02-01 16:26:45 +02:00
virtio_balloon.c virtio_balloon: include disk/file caches memory statistics 2018-01-31 01:47:33 +02:00
virtio_input.c virtio: wrap find_vqs 2017-05-02 23:41:42 +03:00
virtio_mmio.c virtio: virtio_mmio: make of_device_ids const. 2018-01-31 01:47:35 +02:00
virtio_pci_common.c virtio_pci: don't kfree device on register failure 2018-02-01 16:26:45 +02:00
virtio_pci_common.h virtio: add context flag to find vqs 2017-05-02 23:41:43 +03:00
virtio_pci_legacy.c virtio: add context flag to find vqs 2017-05-02 23:41:43 +03:00
virtio_pci_modern.c virtio: add context flag to find vqs 2017-05-02 23:41:43 +03:00
virtio_ring.c SCSI misc on 20170907 2017-09-07 21:11:05 -07:00