[PATCH net] be2net: propagate bridge config query errors

Avi Weiss <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.network
Message-ID <[email protected]>
be_ndo_bridge_getlink() returns success when be_cmd_get_hsw_config()
fails, hiding the error from rtnetlink users.

Return the normalized command status instead.

Fixes: a77dcb8c8ff0 ("be2net: set and query VEB/VEPA mode of the PF interface")
Signed-off-by: Avi Weiss <[email protected]>
---
 drivers/net/ethernet/emulex/benet/be_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index ed302f5ec476..49646e4eeaa9 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -5028,7 +5028,7 @@ static int be_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
 					       adapter->if_handle, &hsw_mode,
 					       NULL);
 		if (status)
-			return 0;
+			return be_cmd_status(status);
 
 		if (hsw_mode == PORT_FWD_TYPE_PASSTHRU)
 			return 0;

base-commit: dd057113ac7ba5bdd2aed3d9405305911152f911
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.