]> Gentwo Git Trees - linux/.git/commit
net: hns3: return error code when function fails
authorJijie Shao <shaojijie@huawei.com>
Thu, 23 Oct 2025 13:13:37 +0000 (21:13 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 28 Oct 2025 00:52:53 +0000 (17:52 -0700)
commit03ca7c8c42be913529eb9f188278114430c6abbd
treee20739e4a3d3ef772f076baf766587659a4aa2d1
parente3a0ca09acbe697245f944ee92b956db58a0ed09
net: hns3: return error code when function fails

Currently, in hclge_mii_ioctl(), the operation to
read the PHY register (SIOCGMIIREG) always returns 0.

This patch changes the return type of hclge_read_phy_reg(),
returning an error code when the function fails.

Fixes: 024712f51e57 ("net: hns3: add ioctl support for imp-controlled PHYs")
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Link: https://patch.msgid.link/20251023131338.2642520-2-shaojijie@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.h