Merge tag 'efi-2019-07-rc1' of git://git.denx.de/u-boot-efi
[oweals/u-boot.git] / drivers / net / phy / lxt.c
index d67bbdd9ca8132cf6d8d29ec1345402add544a3e..2618deb009600114c5c9fabe4a2941af3de413e1 100644 (file)
@@ -1,25 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * LXT PHY drivers
  *
- * 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
- *
  * Copyright 2010-2011 Freescale Semiconductor, Inc.
  * author Andy Fleming
- *
  */
+#include <common.h>
 #include <phy.h>
 
 /* LXT971 Status 2 registers */
@@ -63,10 +49,13 @@ static int lxt971_parse_status(struct phy_device *phydev)
 
 static int lxt971_startup(struct phy_device *phydev)
 {
-       genphy_update_link(phydev);
-       lxt971_parse_status(phydev);
+       int ret;
 
-       return 0;
+       ret = genphy_update_link(phydev);
+       if (ret)
+               return ret;
+
+       return lxt971_parse_status(phydev);
 }
 
 static struct phy_driver LXT971_driver = {