aqc111_set_mac_addr() returns the result of aqc111_write_cmd() on success. That function wraps usb_control_msg(), which returns the number of bytes transferred (6 for ETH_ALEN) rather than zero. Bonding calls ndo_set_mac_address() when enslaving an interface and treats any non-zero return value as failure. Return 0 on success and propagate negative error codes on failure. Signed-off-by: Hanson Wang --- drivers/net/usb/aqc111.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/aqc111.c b/drivers/net/usb/aqc111.c index dd53f413c38f..da5b74637ee2 100644 --- a/drivers/net/usb/aqc111.c +++ b/drivers/net/usb/aqc111.c @@ -471,8 +471,12 @@ static int aqc111_set_mac_addr(struct net_device *net, void *p) return ret; /* Set the MAC address */ - return aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_NODE_ID, ETH_ALEN, - ETH_ALEN, net->dev_addr); + ret = aqc111_write_cmd(dev, AQ_ACCESS_MAC, SFR_NODE_ID, ETH_ALEN, + ETH_ALEN, net->dev_addr); + if (ret < 0) + return ret; + + return 0; } static int aqc111_vlan_rx_kill_vid(struct net_device *net, -- 2.34.1