Merge pull request #110 from qiyongzhong0/fix_bc26_netdev_add
fix bc26_netdev_add
This commit is contained in:
commit
d21fd8fec8
|
@ -631,6 +631,12 @@ static struct netdev *bc26_netdev_add(const char *netdev_name)
|
|||
#define HWADDR_LEN 8
|
||||
struct netdev *netdev = RT_NULL;
|
||||
|
||||
netdev = netdev_get_by_name(netdev_name);
|
||||
if(netdev != RT_NULL)
|
||||
{
|
||||
return(netdev);
|
||||
}
|
||||
|
||||
netdev = (struct netdev *)rt_calloc(1, sizeof(struct netdev));
|
||||
if (netdev == RT_NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue