Changeset 8fed3ef in mainline


Ignore:
Timestamp:
2019-02-06T22:15:59Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2332e13
Parents:
e2f332c
Message:

Improve error handling in virtio-net

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/virtio-net/virtio-net.c

    re2f332c r8fed3ef  
    211211                ddf_msg(LVL_NOTE, "Unsupported number of virtqueues: %u",
    212212                    num_queues);
     213                rc = ELIMIT;
    213214                goto fail;
    214215        }
     
    404405        if (fun == NULL) {
    405406                rc = ENOMEM;
    406                 goto error;
     407                goto uninitialize;
    407408        }
    408409        nic_t *nic = ddf_dev_data_get(dev);
     
    418419        if (rc != EOK) {
    419420                ddf_msg(LVL_ERROR, "Failed binding device function");
    420                 goto uninitialize;
     421                goto destroy;
    421422        }
    422423
     
    434435unbind:
    435436        ddf_fun_unbind(fun);
     437destroy:
     438        ddf_fun_destroy(fun);
    436439uninitialize:
    437440        virtio_net_uninitialize(dev);
    438 error:
    439441        return rc;
    440442}
Note: See TracChangeset for help on using the changeset viewer.