Re: [PATCH] isa: put_device after failing to device_register

From: Greg KH
Date: Tue Jun 14 2022 - 11:13:54 EST


On Tue, Jun 14, 2022 at 10:57:57PM +0800, Zhi Song wrote:
> device_register() is used to register a device with the system.
>
> We cannot directly free dev after calling this function,
> even if it returns an error.
>
> We should use put_device() to give up the reference
> initialized in this function instead.

Same comments on this one as my last review.

greg k-h