use put_device to cleanup resource
Get series with b4
b4 am [email protected]Versions newest first
- v5 Latest4 patches 3 repliesIn review
Changes in v5 from the cover letter
* virtio: correct some comments
* virtio_remoteproc: use put_device directly, not use temp reg_dev
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | virtio: split device_register into device_initialize and device_adddrivers/ | +15 | 1 reply | |
| 2/4 | virtio_pci: don't kfree device on register failuredrivers/ | +6 | 0 replies | |
| 3/4 | virtio_vop: don't kfree device on register failuredrivers/ | +13 | 0 replies | |
| 4/4 | virtio_remoteproc: correct put_device virtio_device.devdrivers/ | +1 | 2 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Cornelia Huck |
|---|---|
| 1/4 | R-b |
| 2/4 | R-b |
| 3/4 | R-b |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 0/4] use put_device to cleanup resource
Hi,
The main change is split device_register into 2 sperate calls:device_initalize() and device_add, and then the caller can use put_device safety when fail to register_virtio_device.
v4->v5:
* virtio: correct some comments
* virtio_remoteproc: use put_device directly, not use temp reg_dev
v3->v4:
* split device_register into device_initialize and devicea_add that the caller can always use put_device when fail to register virtio device.
v2->v3:
* virtio: add new helper do get device's status then determine use put_device or kfree.
v1->v2:
* virtio_pci: add comments in commit message for why using put_device
* virtio_vop: also use put_device int _vop_remove_device
weiping zhang (4):
virtio: split device_register into device_initialize and device_add
virtio_pci: don't kfree device on register failure
virtio_vop: don't kfree device on register failure
virtio_remoteproc: correct put_device virtio_device.dev
drivers/misc/mic/vop/vop_main.c | 20 +++++++++++++------- drivers/remoteproc/remoteproc_virtio.c | 2 +- drivers/virtio/virtio.c | 18 +++++++++++++++--- drivers/virtio/virtio_pci_common.c | 8 ++++++-- 4 files changed, 35 insertions(+), 13 deletions(-)
Signature · 1 line
2.9.4