From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Wed, 27 Jun 2018 13:57:11 +0800 Subject: where and when the kernel destroy devices memory if there were no matched driver for it? In-Reply-To: <563a11f9-f027-73b4-fa88-f51354ce02b3@163.com> References: <563a11f9-f027-73b4-fa88-f51354ce02b3@163.com> Message-ID: <20180627055711.GA16232@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, Jun 27, 2018 at 01:52:55PM +0800, kipade wrote: > Hi, all > > As my question, would kernel destroy deivces struct if there were no matched > driver attached on it? No, only when the device is removed from the system does that structure get destroyed. greg k-h