Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/nil/eth/eth_module.c

    r08e3ca4 r6067284  
    4040#include <async.h>
    4141#include <stdio.h>
    42 #include <errno.h>
     42#include <err.h>
    4343
    4444#include <ipc/ipc.h>
     
    5252int nil_module_start_standalone(async_client_conn_t client_connection)
    5353{
    54         ipcarg_t phonehash;
    55         int rc;
     54        ERROR_DECLARE;
    5655       
    5756        async_set_client_connection(client_connection);
    5857        int net_phone = net_connect_module();
    59 
    60         rc = pm_init();
    61         if (rc != EOK)
    62                 return rc;
     58        ERROR_PROPAGATE(pm_init());
    6359       
    64         rc = nil_initialize(net_phone);
    65         if (rc != EOK)
    66                 goto out;
    67 
    68         rc = REGISTER_ME(SERVICE_ETHERNET, &phonehash);
    69         if (rc != EOK)
    70                 goto out;
     60        ipcarg_t phonehash;
     61        if (ERROR_OCCURRED(nil_initialize(net_phone)) ||
     62            ERROR_OCCURRED(REGISTER_ME(SERVICE_ETHERNET, &phonehash))) {
     63                pm_destroy();
     64                return ERROR_CODE;
     65        }
    7166       
    7267        async_manager();
    73 
    74 out:
     68       
    7569        pm_destroy();
    76         return rc;
     70        return EOK;
    7771}
    7872
Note: See TracChangeset for help on using the changeset viewer.