X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=net%2Feth.c;h=c96e767e8e22b8beef592deaee91cca983ef64e6;hb=8ad59c9a7bef49a18078888ad8eba8e87737c3b2;hp=49458c8db914b96aa082920ed800639b73fcbb2a;hpb=f8be7d659c45720edb91503d2a480fc198e7ee9d;p=u-boot diff --git a/net/eth.c b/net/eth.c index 49458c8db9..c96e767e8e 100644 --- a/net/eth.c +++ b/net/eth.c @@ -2,23 +2,7 @@ * (C) Copyright 2001-2010 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -218,9 +202,12 @@ int eth_write_hwaddr(struct eth_device *dev, const char *base_name, } if (dev->write_hwaddr && - !eth_mac_skip(eth_number) && - is_valid_ether_addr(dev->enetaddr)) + !eth_mac_skip(eth_number)) { + if (!is_valid_ether_addr(dev->enetaddr)) + return -1; + ret = dev->write_hwaddr(dev); + } return ret; }