Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2095683pxb; Mon, 12 Apr 2021 14:21:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3srNTW7gmN2ree/sGp76o1nZj3DeQUqxA3ajODwjenXPz39kxuhLzKxlsX9nylRWY0krR X-Received: by 2002:a05:6402:3550:: with SMTP id f16mr30834021edd.134.1618262502514; Mon, 12 Apr 2021 14:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618262502; cv=none; d=google.com; s=arc-20160816; b=opxnjaOLvsc8z7cgNJPVtyqDU7SZJNBr+kfE1DbL9vk+9AbFJYwJT1hDMtFTp+3cSh cOsPwAIK/EO1+8cyIYzlbYyDISjTS/vjmmzQ20kDIP1KAsvr17asJe6WnGxhXR3h11Jp tf+UTHb7zE/ej0M8aFFik8iYFFXXtfN8AdSu1RMhajZfrWSREkOX/RQmpmSprg32Or/4 5/F2++w1nHPbG8yWuj07oZ5UCNWHV01oucHRC67Eich0hGXyJmMmO0gKq6Dh5XGmx1aB 8s66XgfZiO0Z1eou0ZnbVMoVWl4Edkpx2TgRyK0eF//qQsv0ZT8uLlgReqg+XMfZrzDz O/dQ== 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=oID0upB00SuXgnNCxrvdkLA4xx/weTrBclh5RXauSPI=; b=cIRreON3EBalklfCP3195Fd0k4MAauJ+ItcPmgtibdPUoTaQSv968nw7ayQj7YpzaO 91AC/MSfMWbmla+KHNXSngYhMjtj9HI6bUNZgleV2ETwjWULxMH0HeeSiPudV64yXeTj uu0+0Asco6n/u1h/9qQQtbQWKH860q7bDv0d5VqxGUCG63SIwln6g2SY7w7hw5V9jzrw N+sCUAg+R7aXryK4uzvEBGp0HgOcaAbl+AFQcK/E1Kos2XWsGG04/IDKQxhET6k4Vjrc vkoinN8P0ANfJSmmgeRBy+Bv27ujHBrY08f2cT0ddxwRFAkH5SWsgDOExWl3xKcJFv6j bAsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1fgaXpEi; 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 ne7si8433608ejc.604.2021.04.12.14.21.17; Mon, 12 Apr 2021 14:21:42 -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=1fgaXpEi; 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 S240671AbhDLJKv (ORCPT + 99 others); Mon, 12 Apr 2021 05:10:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:48564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239085AbhDLIzm (ORCPT ); Mon, 12 Apr 2021 04:55:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 784C561243; Mon, 12 Apr 2021 08:55:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217718; bh=b6jP2esBCvWfvUUmVvrzymXsei9WXhVfRMlVzkY32mw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1fgaXpEiVUNJsApRoRS82ORWBSrHiw2blAUhN2y2ujRL7WUDYTz2u3mIFAkCAnsxU Mlaiizr/Bz1EVyra7X3mappRweQs7KOmaW19LhJb8js69+7uwkGETwMFMt0ZTP4h7p uxJvOoXVk2VSxKXviRRW06bXdOKilOpytSiURBRE= 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 5.10 120/188] gianfar: Handle error code at MAC address change Date: Mon, 12 Apr 2021 10:40:34 +0200 Message-Id: <20210412084017.640892289@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084013.643370347@linuxfoundation.org> References: <20210412084013.643370347@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 4fab2ee5bbf5..e4d9c4c640e5 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -364,7 +364,11 @@ static void gfar_set_mac_for_addr(struct net_device *dev, int num, 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