net: ethernet: mtk_eth_wed: add missing put_device() in mtk_wed_add_hw()
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 17 Oct 2022 03:51:55 +0000 (11:51 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Oct 2022 08:35:05 +0000 (09:35 +0100)
commit9d4f20a476ca57e4c9246eb1fa2a61bea2354720
tree82be205a5c57eee4f4ea279195d2231a9948f158
parentb3d0d98179d62f9d55635a600679c4fa362baf8d
net: ethernet: mtk_eth_wed: add missing put_device() in mtk_wed_add_hw()

After calling get_device() in mtk_wed_add_hw(), in error path, put_device()
needs be called.

Fixes: 804775dfc288 ("net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_wed.c