summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2020-04-07 16:07:46 +0200
committerPatrick Delaunay <patrick.delaunay@st.com>2020-09-09 14:19:12 +0200
commitcf8df34015fcbd6b85a8ebadd22382d68c57f4e5 (patch)
tree31e178a4206c6e909908d44ab8f4119c494e2e9e /arch
parent96d66a9b8ce11aae9f8bef5244b83b4740b37644 (diff)
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: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-stm32mp/cpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index b7fcee2b36..f19e5c3f33 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -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