Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/devman.c

    re6211f8 r79ae36dd  
    231231        }
    232232       
     233        async_wait_for(req, &retval);
     234        if (retval != EOK) {
     235                devman_exchange_end(exch);
     236               
     237                if (funh != NULL)
     238                        *funh = -1;
     239               
     240                return retval;
     241        }
     242       
     243        if (funh != NULL)
     244                *funh = (int) IPC_GET_ARG1(answer);
     245       
    233246        link_t *link = match_ids->ids.next;
    234247        match_id_t *match_id = NULL;
     
    237250                match_id = list_get_instance(link, match_id_t, link);
    238251               
    239                 ipc_call_t answer2;
    240                 aid_t req2 = async_send_1(exch, DEVMAN_ADD_MATCH_ID,
    241                     match_id->score, &answer2);
     252                ipc_call_t answer;
     253                aid_t req = async_send_1(exch, DEVMAN_ADD_MATCH_ID,
     254                    match_id->score, &answer);
    242255                retval = async_data_write_start(exch, match_id->id,
    243256                    str_size(match_id->id));
    244                 if (retval != EOK) {
    245                         devman_exchange_end(exch);
    246                         async_wait_for(req2, NULL);
    247                         async_wait_for(req, NULL);
    248                         return retval;
    249                 }
    250                
    251                 async_wait_for(req2, &retval);
    252257                if (retval != EOK) {
    253258                        devman_exchange_end(exch);
     
    256261                }
    257262               
     263                async_wait_for(req, &retval);
     264                if (retval != EOK) {
     265                        devman_exchange_end(exch);
     266                        return retval;
     267                }
     268               
    258269                link = link->next;
    259270        }
    260271       
    261272        devman_exchange_end(exch);
    262        
    263         async_wait_for(req, &retval);
    264         if (retval == EOK) {
    265                 if (funh != NULL)
    266                         *funh = (int) IPC_GET_ARG1(answer);
    267         } else {
    268                 if (funh != NULL)
    269                         *funh = -1;
    270         }
    271        
    272         return retval;
     273        return EOK;
    273274}
    274275
Note: See TracChangeset for help on using the changeset viewer.