Re: [PATCH v4 4/4] virtio_remoteproc: don't kfree device on register failure

2017-12-20 Thread weiping zhang
2017-12-21 0:12 GMT+08:00 Cornelia Huck : > On Wed, 20 Dec 2017 12:27:33 +0800 > weiping zhang wrote: > >> rproc_virtio_dev_release will be called iff virtio_device.dev's >> refer count became to 0. Here we should check if we call device_register > > "reference count drops to 0" > > s/call/called/

Re: [PATCH v4 4/4] virtio_remoteproc: don't kfree device on register failure

2017-12-20 Thread Cornelia Huck
On Wed, 20 Dec 2017 12:27:33 +0800 weiping zhang wrote: > rproc_virtio_dev_release will be called iff virtio_device.dev's > refer count became to 0. Here we should check if we call device_register "reference count drops to 0" s/call/called/ > or not, if called, put vdev.dev, and then rproc->de

[PATCH v4 4/4] virtio_remoteproc: don't kfree device on register failure

2017-12-19 Thread weiping zhang
rproc_virtio_dev_release will be called iff virtio_device.dev's refer count became to 0. Here we should check if we call device_register or not, if called, put vdev.dev, and then rproc->dev's cleanup will be done in rproc_virtio_dev_release, otherwise we do cleanup directly. Signed-off-by: weiping