Re: [PATCH 32/38] pcie: add missing put_device call
From: Yinghai Lu
Date: Fri Dec 20 2013 - 01:15:47 EST
On Thu, Dec 19, 2013 at 2:10 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:
> [+cc Greg, Yinghai]
>
> On Thu, Dec 19, 2013 at 04:06:46PM +0100, Levente Kurusa wrote:
>> This is required so that we give up the last reference to the device.
>> Removed the kfree() as put_device will result in release_pcie_device being
>> called and hence the container of the device will be kfree'd.
>>
>> Signed-off-by: Levente Kurusa <levex@xxxxxxxxx>
>
> Thanks, I applied a slightly modified version of this to my pci/deletion
> branch for v3.14.
>
> I think the get_device() after device_register() succeeds and the
> put_device() before device_unregister() are superfluous, so I propose the
> series included below. Any comments?
Nice cleanup.
Thanks
Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/