projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AX88180: switch to common mii.h header
[oweals/u-boot.git]
/
drivers
/
net
/
smc911x.c
diff --git
a/drivers/net/smc911x.c
b/drivers/net/smc911x.c
index cac08d0a7cccac93058fef90009316f02420114c..3da4c35fc29270ba6e784eb8404f47b736108b58 100644
(file)
--- a/
drivers/net/smc911x.c
+++ b/
drivers/net/smc911x.c
@@
-220,7
+220,7
@@
static int smc911x_rx(struct eth_device *dev)
smc911x_reg_write(dev, RX_CFG, 0);
smc911x_reg_write(dev, RX_CFG, 0);
- tmplen = (pktlen +
2+
3) / 4;
+ tmplen = (pktlen + 3) / 4;
while (tmplen--)
*data++ = pkt_data_pull(dev, RX_DATA_FIFO);
while (tmplen--)
*data++ = pkt_data_pull(dev, RX_DATA_FIFO);
@@
-242,7
+242,6
@@
int smc911x_initialize(u8 dev_num, int base_addr)
dev = malloc(sizeof(*dev));
if (!dev) {
dev = malloc(sizeof(*dev));
if (!dev) {
- free(dev);
return -1;
}
memset(dev, 0, sizeof(*dev));
return -1;
}
memset(dev, 0, sizeof(*dev));