]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
net: lwip: simplify net_lwip_eth_start
authorTim Harvey <tharvey@gateworks.com>
Thu, 10 Jul 2025 15:15:56 +0000 (08:15 -0700)
committerJerome Forissier <jerome.forissier@linaro.org>
Fri, 1 Aug 2025 07:30:47 +0000 (09:30 +0200)
For NET_LWIP eth_is_on_demand_init() is always 1 so remove the check and
simplify the code.

Suggested-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
net/lwip/net-lwip.c

index 3918d57d7e588ea93161693c6aa2e5e99120ea05..8c6f057aab50d29969fb715564fa5336602a4e79 100644 (file)
@@ -184,16 +184,12 @@ int net_lwip_eth_start(void)
        int ret;
 
        net_init();
-       if (eth_is_on_demand_init()) {
+       eth_halt();
+       eth_set_current();
+       ret = eth_init();
+       if (ret < 0) {
                eth_halt();
-               eth_set_current();
-               ret = eth_init();
-               if (ret < 0) {
-                       eth_halt();
-                       return ret;
-               }
-       } else {
-               eth_init_state_only();
+               return ret;
        }
 
        return 0;