Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1595402pxb; Mon, 12 Apr 2021 01:48:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4cKTxd+XSspnqbbISs8N7ocQdh9ORNpWTe1xKB1YkYiaCmyEnNsXW8hwMpU9VZXsyxZst X-Received: by 2002:a17:90b:344a:: with SMTP id lj10mr340384pjb.101.1618217312665; Mon, 12 Apr 2021 01:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618217312; cv=none; d=google.com; s=arc-20160816; b=tkC9ZJlLbtEbHhagi04ZkF1lmcXJwN6fg7MSmdYV5J4Fwab9VQMjsZ5ITQQGD2vNXi tHZKNnlnn5+hnZbF3JEzo7kRXqp8Qox4KgJSYhdXDKwsObfcqvjXEDXVrk9ifSms6MD7 y92boft8Qqo4cShJtas8UXLqEa/xhGPLvd23MOKmrYPAgi777B/HHLYEf6bqI6WyBGrs PnEWf1DaQyi0Ac67YVaHwCT3eWPht6D9Wxc+C4n1FA8btceV2T4oD8cb9pnatQhFdrwN sreMyqJ3qlmxj9YPMhxPNzvD88PzXeYZe9RcqWTvFTdHCG58K+5J+4hsbRE8UdipBGbc mprg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vo3n9URymuRe7DMXoBDSz4BXqTGW2A/lolmPqZrEd2I=; b=OjWQmv3BKI+eSeXS6wvzNPY3npwasjU3/cx6XUzKST1ptB5ufvoZKNxCjdI4DoivA/ PHYCDy9Q2waepSVHQjMRTaooxeH/jMgIMZYqrkYD1izqsE035a6doyPVgsfmIWpJkSOh bO2crr9jPLyeVWv0xSmYAmuhf8bEifgNcT6T6hf1Tlt8Y/96R7XDTql464FWHUB/Kwj4 BHNTvg1vqjQS4q/tu7ke4Uc+7MFAIBrDE4I7DcBOqjx0yvNyiMDDj+6AsB+xuQ6e6uUk W99xh1vedevlOvm8BT/w9zT373Uszxdc/6ROzFb81UTgAB/r6QQatWZ9sx/lC6VMIncv 5RTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=H3ZfkLOQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si13379990pgc.413.2021.04.12.01.48.20; Mon, 12 Apr 2021 01:48:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=H3ZfkLOQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237932AbhDLIqe (ORCPT + 99 others); Mon, 12 Apr 2021 04:46:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:37260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237396AbhDLIpV (ORCPT ); Mon, 12 Apr 2021 04:45:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8D09761221; Mon, 12 Apr 2021 08:45:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217104; bh=X2GTr6cIR+i3mT8wTm5jYFptWyMlQdwajx7efTsFOC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H3ZfkLOQMuHsG+nUykeQeMymCSj3XKZQ2OAcFO4SciKDkUN710zWKYMAXnx5owTVW JYPKR0q5W64QwSDtE68l9nd+wuZghT0xTbvRFEdxMm8P3H6/V1KiMsA46yZjrCKQJW l/E0yROHftY09ma+XeFtlm+4kq4cHH4Qu85FPQ24= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Claudiu Manoil , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 37/66] gianfar: Handle error code at MAC address change Date: Mon, 12 Apr 2021 10:40:43 +0200 Message-Id: <20210412083959.316978857@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412083958.129944265@linuxfoundation.org> References: <20210412083958.129944265@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Claudiu Manoil [ Upstream commit bff5b62585123823842833ab20b1c0a7fa437f8c ] Handle return error code of eth_mac_addr(); Fixes: 3d23a05c75c7 ("gianfar: Enable changing mac addr when if up") Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/gianfar.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index df03cf63cb02..4feab06b7ad7 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -485,7 +485,11 @@ static struct net_device_stats *gfar_get_stats(struct net_device *dev) static int gfar_set_mac_addr(struct net_device *dev, void *p) { - eth_mac_addr(dev, p); + int ret; + + ret = eth_mac_addr(dev, p); + if (ret) + return ret; gfar_set_mac_for_addr(dev, 0, dev->dev_addr); -- 2.30.2