Skip to content
Snippets Groups Projects
Commit cf8df340 authored by Patrick Delaunay's avatar Patrick Delaunay
Browse files

arm: stm32mp: cleanup test on eth_env_set_enetaddr result


Remove the unnecessary inversion on the eth_env_set_enetaddr() result which
only make complex the code of setup_mac_address() and display an invalid
value in the associated pr_err.

Signed-off-by: default avatarPatrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: default avatarMarek Vasut <marex@denx.de>
parent 96d66a9b
No related branches found
No related tags found
No related merge requests found
......@@ -580,8 +580,8 @@ __weak int setup_mac_address(void)
return -EINVAL;
}
pr_debug("OTP MAC address = %pM\n", enetaddr);
ret = !eth_env_set_enetaddr("ethaddr", enetaddr);
if (!ret)
ret = eth_env_set_enetaddr("ethaddr", enetaddr);
if (ret)
pr_err("Failed to set mac address %pM from OTP: %d\n",
enetaddr, ret);
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment