projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'master' of git://git.denx.de/u-boot-usb
[oweals/u-boot.git]
/
drivers
/
net
/
natsemi.c
diff --git
a/drivers/net/natsemi.c
b/drivers/net/natsemi.c
index e09da1d2ae429108973cb61c06d9cb161a7800ca..14b2d355c15e07d5336445808bc79321e276f6c5 100644
(file)
--- a/
drivers/net/natsemi.c
+++ b/
drivers/net/natsemi.c
@@
-321,6
+321,11
@@
natsemi_initialize(bd_t * bis)
}
dev = (struct eth_device *) malloc(sizeof *dev);
+ if (!dev) {
+ printf("natsemi: Can not allocate memory\n");
+ break;
+ }
+ memset(dev, 0, sizeof(*dev));
sprintf(dev->name, "dp83815#%d", card_number);
dev->iobase = bus_to_phys(iobase);