Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2134334pxb; Mon, 12 Apr 2021 15:36:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6CUwgX7NC0S8BQY2K2B43oRHt4JJ/Qm8gxJoLKxeQx7QBvo2ZPvSiuP9mTgEn+62FNAz1 X-Received: by 2002:a50:fc94:: with SMTP id f20mr31473443edq.77.1618266961050; Mon, 12 Apr 2021 15:36:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618266961; cv=none; d=google.com; s=arc-20160816; b=Mw3qOfMIBADGjk8hc+27RkGAfetnPQ7H8YjjiACp6FLdt4LnPMuXtnhHRJ3TPFDjb4 bEwcBEU5iX99FmS6CV1DCc/tiisTvL+XbCqhe2ZabjPYDmLl7wgT4jyehMaKRRzEGpm5 +8npB6dXCXSutBsbafaD8wJfyVIUyOH+AtX5X5pwC7ugqyiNNVJcxHKfNlN3rlt3Db8X rwMSr69/EK4OsYUn3b10XdfhqN9YptNTWRVn3cVm+hgXMlYNk/kds8wkxX9OkQV3pV/c 36XmLo6fsnVZSrpByK0v8vApe1gICi4DE8tozfVIOO9AInbdQSPTscH7JuXbABE0a68J C5CA== 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=mSGyoHDo516uixU4cw/7EWkO+KO7blQF/c2E3pa37+fdEgQY1klIJU6a92ill+lQNZ tKO1DcOousk+gW5FO/P8ZNKEIZ8oYmW12aB4N8RumfHzcJSgdRcoRH2OrfA2+hGNUGpI M6zKsPiq+wet2sIK07v5+SFFPwoe8dJxxGAjNjKz59eU34amTSopgpZ6CfKTgy9buh+b GaW7lhXIEXt0KECQbFvWFqt68NWXrn8BVQgInNnxspufiy/3LZGn5O7bLG9YVhIkyWmm l8MAbY2N7zZG8/JppoUqBquC9WcYTas6A1/RjlFW+ys5R1Ci5LmS2iZebApTfeAXPDYu 4VEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=C7AV5egt; 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 i19si8575341ejd.152.2021.04.12.15.35.36; Mon, 12 Apr 2021 15:36:01 -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=C7AV5egt; 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 S240698AbhDLJhb (ORCPT + 99 others); Mon, 12 Apr 2021 05:37:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:35860 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240619AbhDLJKr (ORCPT ); Mon, 12 Apr 2021 05:10:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C4C7661393; Mon, 12 Apr 2021 09:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618218355; bh=b6jP2esBCvWfvUUmVvrzymXsei9WXhVfRMlVzkY32mw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C7AV5egtTdWKnn/Ywq6dGDfEQoBw+00QMtL9wYMfpGR3cCTXzT7v7EHbr+b6DhnNS X+PeQhOv9Xjhr3Jqf+hqibX+yHyF14STce5OXgB0n09Xumne5jENB6l6FVfRRS858G T/+AZVhEiUdUzki+ZJXJTa2Uw3b7iXvsb/pTzoio= 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.11 131/210] gianfar: Handle error code at MAC address change Date: Mon, 12 Apr 2021 10:40:36 +0200 Message-Id: <20210412084020.381989292@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084016.009884719@linuxfoundation.org> References: <20210412084016.009884719@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