summaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/netdev_settings.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/netdev_settings.c b/src/net/netdev_settings.c
index c4fd36941..7d893a126 100644
--- a/src/net/netdev_settings.c
+++ b/src/net/netdev_settings.c
@@ -141,7 +141,8 @@ static int netdev_fetch_bustype ( struct net_device *netdev, void *data,
assert ( desc->bus_type < ( sizeof ( bustypes ) /
sizeof ( bustypes[0] ) ) );
bustype = bustypes[desc->bus_type];
- assert ( bustype != NULL );
+ if ( ! bustype )
+ return -ENOENT;
strncpy ( data, bustype, len );
return strlen ( bustype );
}