Whamcloud - gitweb
LU-3068 build: fix 'incorrect expression' errors
[fs/lustre-release.git] / lustre / obdclass / genops.c
index 7c06088..436aa4d 100644 (file)
@@ -315,8 +315,7 @@ struct obd_device *class_newdev(const char *type_name, const char *name)
         for (i = 0; i < class_devno_max(); i++) {
                 struct obd_device *obd = class_num2obd(i);
 
-                if (obd && obd->obd_name &&
-                    (strcmp(name, obd->obd_name) == 0)) {
+               if (obd && (strcmp(name, obd->obd_name) == 0)) {
                         CERROR("Device %s already exists at %d, won't add\n",
                                name, i);
                         if (result) {
@@ -397,7 +396,7 @@ int class_name2dev(const char *name)
         for (i = 0; i < class_devno_max(); i++) {
                 struct obd_device *obd = class_num2obd(i);
 
-                if (obd && obd->obd_name && strcmp(name, obd->obd_name) == 0) {
+               if (obd && strcmp(name, obd->obd_name) == 0) {
                         /* Make sure we finished attaching before we give
                            out any references */
                         LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
@@ -1037,6 +1036,7 @@ struct obd_import *class_new_import(struct obd_device *obd)
         if (imp == NULL)
                 return NULL;
 
+       CFS_INIT_LIST_HEAD(&imp->imp_pinger_chain);
         CFS_INIT_LIST_HEAD(&imp->imp_zombie_chain);
         CFS_INIT_LIST_HEAD(&imp->imp_replay_list);
         CFS_INIT_LIST_HEAD(&imp->imp_sending_list);