projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6752ed0
)
mpc83xx: protect memcpy to bad address if a local-mac-address is missing from dt
author
Kim Phillips
<kim.phillips@freescale.com>
Tue, 30 Jan 2007 22:15:21 +0000
(16:15 -0600)
committer
Kim Phillips
<kim.phillips@freescale.com>
Fri, 2 Mar 2007 17:05:53 +0000
(11:05 -0600)
protect memcpy to bad address if a local-mac-address is missing from dt
cpu/mpc83xx/cpu.c
patch
|
blob
|
history
diff --git
a/cpu/mpc83xx/cpu.c
b/cpu/mpc83xx/cpu.c
index 15e04ba5f7415cc3f4369f473b02229898661058..f83981e8b8748c4d66f9c3d82218152b14e77ced 100644
(file)
--- a/
cpu/mpc83xx/cpu.c
+++ b/
cpu/mpc83xx/cpu.c
@@
-309,11
+309,13
@@
ft_cpu_setup(void *blob, bd_t *bd)
#ifdef CONFIG_MPC83XX_TSEC1
p = ft_get_prop(blob, "/" OF_SOC "/ethernet@24000/local-mac-address", &len);
+ if (p != NULL)
memcpy(p, bd->bi_enetaddr, 6);
#endif
#ifdef CONFIG_MPC83XX_TSEC2
p = ft_get_prop(blob, "/" OF_SOC "/ethernet@25000/local-mac-address", &len);
+ if (p != NULL)
memcpy(p, bd->bi_enet1addr, 6);
#endif
}