Re: [PATCH v2 1/2] virtio_mmio: add cleanup for virtio_mmio_probe

2017-12-06 Thread weiping zhang
2017-12-06 19:11 GMT+08:00 Cornelia Huck : > On Tue, 5 Dec 2017 19:57:10 +0800 > weiping zhang wrote: > >> As mentioned at drivers/base/core.c: >> /* >> * NOTE: _Never_ directly free @dev after calling this function, even >> * if it returned an

[PATCH v2 1/2] virtio_mmio: add cleanup for virtio_mmio_probe

2017-12-05 Thread weiping zhang
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. */ Normal we do cleanup for @vm_dev by contianer_of(@dev), but in