]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: fix memory leak in device-create error path
authorJohan Hovold <johan@kernel.org>
Thu, 6 Aug 2020 15:37:53 +0000 (17:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Aug 2020 21:11:42 +0000 (14:11 -0700)
commitce0065fbb5fe127f8ecb673eb8231ea0b9735b7c
treeef93717094e0dd51449223dd54a2524b605681c2
parent0a91a726953a0684e877328c4c7510557c6d1183
net: phy: fix memory leak in device-create error path

A recent commit introduced a late error path in phy_device_create()
which fails to release the device name allocated by dev_set_name().

Fixes: f1807410f434 ("net: phy: check return code when requesting PHY driver module")
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c