flow: Delete unused FWW_VLAN_TCI bit.
[openvswitch] / lib / netdev.c
index a74d5d4826eab2a284bf9b677ed4eb83d543a411..34cb1e9b53fac376644093d5817a90baa74edcd3 100644 (file)
@@ -40,7 +40,7 @@
 #include "svec.h"
 #include "vlog.h"
 
-VLOG_DEFINE_THIS_MODULE(netdev)
+VLOG_DEFINE_THIS_MODULE(netdev);
 
 static struct shash netdev_classes = SHASH_INITIALIZER(&netdev_classes);
 
@@ -251,6 +251,7 @@ static int
 create_device(struct netdev_options *options, struct netdev_dev **netdev_devp)
 {
     struct netdev_class *netdev_class;
+    int error;
 
     if (!options->type || strlen(options->type) == 0) {
         /* Default to system. */
@@ -262,8 +263,10 @@ create_device(struct netdev_options *options, struct netdev_dev **netdev_devp)
         return EAFNOSUPPORT;
     }
 
-    return netdev_class->create(netdev_class, options->name, options->args,
-                                netdev_devp);
+    error = netdev_class->create(netdev_class, options->name, options->args,
+                                 netdev_devp);
+    assert(error || (*netdev_devp)->netdev_class == netdev_class);
+    return error;
 }
 
 /* Opens the network device named 'name' (e.g. "eth0") and returns zero if