This is a note to let you know that I've just added the patch titled enetc: simplify the return expression of enetc_vf_set_mac_addr() to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: enetc-simplify-the-return-expression-of-enetc_vf_set.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 3491af9ef797aac5aff39956be138ed4d9fa384c Author: Qinglang Miao <miaoqinglang@xxxxxxxxxx> Date: Mon Sep 21 21:10:26 2020 +0800 enetc: simplify the return expression of enetc_vf_set_mac_addr() [ Upstream commit d4b717dd2009f9003a5b4844a0e0ae0370d4c506 ] Simplify the return expression. Signed-off-by: Qinglang Miao <miaoqinglang@xxxxxxxxxx> Reviewed-by: Claudiu Manoil <claudiu.manoil@xxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Stable-dep-of: badccd49b93b ("net: enetc: set MAC address to the VF net_device") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/net/ethernet/freescale/enetc/enetc_vf.c b/drivers/net/ethernet/freescale/enetc/enetc_vf.c index 3a8c2049b417c..af287b6d5f3b7 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_vf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_vf.c @@ -85,16 +85,11 @@ static int enetc_vf_set_mac_addr(struct net_device *ndev, void *addr) { struct enetc_ndev_priv *priv = netdev_priv(ndev); struct sockaddr *saddr = addr; - int err; if (!is_valid_ether_addr(saddr->sa_data)) return -EADDRNOTAVAIL; - err = enetc_msg_vsi_set_primary_mac_addr(priv, saddr); - if (err) - return err; - - return 0; + return enetc_msg_vsi_set_primary_mac_addr(priv, saddr); } static int enetc_vf_set_features(struct net_device *ndev,