mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 00:21:06 +00:00
smc911x: make smc911x_initialize return correct value
Make smc911x_initialize return -1 on error and number of interfaces detected otherwise. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
c44efcf97b
commit
fbd47b6753
1 changed files with 2 additions and 2 deletions
|
@ -243,7 +243,7 @@ int smc911x_initialize(u8 dev_num, int base_addr)
|
|||
dev = malloc(sizeof(*dev));
|
||||
if (!dev) {
|
||||
free(dev);
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
memset(dev, 0, sizeof(*dev));
|
||||
|
||||
|
@ -271,5 +271,5 @@ int smc911x_initialize(u8 dev_num, int base_addr)
|
|||
sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);
|
||||
|
||||
eth_register(dev);
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue