master/pdo_list.c
branchstable-1.5
changeset 2421 bc2d4bf9cbe5
parent 1823 2bf892fe8080
child 2522 ec403cf308eb
equal deleted inserted replaced
2420:69056c46aa4d 2421:bc2d4bf9cbe5
   150     list_for_each_entry(mapped_pdo, &pl->list, list) {
   150     list_for_each_entry(mapped_pdo, &pl->list, list) {
   151         if (mapped_pdo->index != pdo->index) continue;
   151         if (mapped_pdo->index != pdo->index) continue;
   152         EC_ERR("PDO 0x%04X is already mapped!\n", pdo->index);
   152         EC_ERR("PDO 0x%04X is already mapped!\n", pdo->index);
   153         return -EEXIST;
   153         return -EEXIST;
   154     }
   154     }
   155     
   155 
   156     if (!(mapped_pdo = kmalloc(sizeof(ec_pdo_t), GFP_KERNEL))) {
   156     if (!(mapped_pdo = kmalloc(sizeof(ec_pdo_t), GFP_KERNEL))) {
   157         EC_ERR("Failed to allocate PDO memory.\n");
   157         EC_ERR("Failed to allocate PDO memory.\n");
   158         return -ENOMEM;
   158         return -ENOMEM;
   159     }
   159     }
   160 
   160 
   188     list_for_each_entry(other_pdo, &other->list, list) {
   188     list_for_each_entry(other_pdo, &other->list, list) {
   189         ret = ec_pdo_list_add_pdo_copy(pl, other_pdo);
   189         ret = ec_pdo_list_add_pdo_copy(pl, other_pdo);
   190         if (ret)
   190         if (ret)
   191             return ret;
   191             return ret;
   192     }
   192     }
   193     
   193 
   194     return 0;
   194     return 0;
   195 }
   195 }
   196 
   196 
   197 /*****************************************************************************/
   197 /*****************************************************************************/
   198 
   198