Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Librem5
uboot-imx
Commits
95515306
Commit
95515306
authored
Mar 13, 2006
by
Wolfgang Denk
Browse files
au1x00_eth.c: check malloc return value and abort if it failed
Patch by Andrew Dyer, 26 Jul 2005
parent
c15f80ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
95515306
...
...
@@ -2,6 +2,9 @@
Changes since U-Boot 1.1.4:
======================================================================
* au1x00_eth.c: check malloc return value and abort if it failed
Patch by Andrew Dyer, 26 Jul 2005
* Change the sequence of events in soft_i2c.c:send_ack() to keep from
incorrectly generating start/stop conditions on the bus.
Patch by Andrew Dyer, 26 Jul 2005
...
...
cpu/mips/au1x00_eth.c
View file @
95515306
...
...
@@ -224,10 +224,14 @@ static void au1x00_halt(struct eth_device* dev){
int
au1x00_enet_initialize
(
bd_t
*
bis
){
struct
eth_device
*
dev
;
dev
=
(
struct
eth_device
*
)
malloc
(
sizeof
*
dev
);
if
((
dev
=
(
struct
eth_device
*
)
malloc
(
sizeof
*
dev
))
==
NULL
)
{
puts
(
"malloc failed
\n
"
);
return
0
;
}
memset
(
dev
,
0
,
sizeof
*
dev
);
sprintf
(
dev
->
name
,
"Au1X00
ETHERNET
"
);
sprintf
(
dev
->
name
,
"Au1X00
ethernet
"
);
dev
->
iobase
=
0
;
dev
->
priv
=
0
;
dev
->
init
=
au1x00_init
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment