Re: [PATCH 5.10 90/93] net: mdiobus: Fix memory leak in __mdiobus_register

From: Florian Fainelli
Date: Mon Oct 04 2021 - 16:58:24 EST


On 10/4/21 5:53 AM, Greg Kroah-Hartman wrote:
> From: Yanfei Xu <yanfei.xu@xxxxxxxxxxxxx>
>
> commit ab609f25d19858513919369ff3d9a63c02cd9e2e upstream.
>
> Once device_register() failed, we should call put_device() to
> decrement reference count for cleanup. Or it will cause memory
> leak.

Also needs to be dropped.
--
Florian