net: lwip: simplify net_lwip_eth_start
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>
This commit is contained in:
committed by
Jerome Forissier
parent
9104267e67
commit
bd4de55951
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user