diff options
Diffstat (limited to 'drivers/net/ethernet/micrel/ks8851_mll.c')
-rw-r--r-- | drivers/net/ethernet/micrel/ks8851_mll.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c index c946841c0a06..e52b015e31a9 100644 --- a/drivers/net/ethernet/micrel/ks8851_mll.c +++ b/drivers/net/ethernet/micrel/ks8851_mll.c @@ -1,19 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-only /** * drivers/net/ethernet/micrel/ks8851_mll.c * Copyright (c) 2009 Micrel Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Supports: @@ -1327,8 +1315,8 @@ static int ks8851_probe(struct platform_device *pdev) /* overwriting the default MAC address */ if (pdev->dev.of_node) { mac = of_get_mac_address(pdev->dev.of_node); - if (mac) - memcpy(ks->mac_addr, mac, ETH_ALEN); + if (!IS_ERR(mac)) + ether_addr_copy(ks->mac_addr, mac); } else { struct ks8851_mll_platform_data *pdata; |