]> xenbits.xensource.com Git - people/andrewcoop/hwloc.git/commitdiff
synthetic: Remove duplicate check for the number of PU levels
authorBrice Goglin <Brice.Goglin@inria.fr>
Tue, 11 Feb 2014 21:27:51 +0000 (22:27 +0100)
committerBrice Goglin <Brice.Goglin@inria.fr>
Tue, 11 Feb 2014 21:27:51 +0000 (22:27 +0100)
Found by Coverity Scan.

src/topology-synthetic.c

index 7322907b801fa260c57e350724ff18f58da7d94c..c374a3d4c850e8072871b0b58cb78eeae3b903b8 100644 (file)
@@ -145,12 +145,6 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data,
     }
     switch (type) {
       case HWLOC_OBJ_PU:
-       if (nb_pu_levels) {
-         if (verbose)
-           fprintf(stderr, "Synthetic string can not have several PU levels\n");
-         errno = EINVAL;
-         return -1;
-       }
        nb_pu_levels++;
        break;
       case HWLOC_OBJ_CACHE:
@@ -176,7 +170,6 @@ hwloc_backend_synthetic_init(struct hwloc_synthetic_backend_data_s *data,
     errno = EINVAL;
     return -1;
   }
-
   if (nb_pu_levels > 1) {
     if (verbose)
       fprintf(stderr, "Synthetic string can not have several PU levels\n");