static int of_dpa_cmd_group_add(OfDpa *of_dpa, uint32_t group_id,

                                RockerTlv **group_tlvs)

{

    OfDpaGroup *group = of_dpa_group_find(of_dpa, group_id);

    int err;



    if (group) {

        return -ROCKER_EEXIST;

    }



    group = of_dpa_group_alloc(group_id);

    if (!group) {

        return -ROCKER_ENOMEM;

    }



    err = of_dpa_cmd_group_do(of_dpa, group_id, group, group_tlvs);

    if (err) {

        goto err_cmd_add;

    }



    err = of_dpa_group_add(of_dpa, group);

    if (err) {

        goto err_cmd_add;

    }



    return ROCKER_OK;



err_cmd_add:

    g_free(group);

    return err;

}

static int of_dpa_cmd_group_add(OfDpa *of_dpa, uint32_t group_id,

                                RockerTlv **group_tlvs)

{

    OfDpaGroup *group = of_dpa_group_find(of_dpa, group_id);

    int err;



    if (group) {

        return -ROCKER_EEXIST;

    }



    group = of_dpa_group_alloc(group_id);

    if (!group) {

        return -ROCKER_ENOMEM;

    }



    err = of_dpa_cmd_group_do(of_dpa, group_id, group, group_tlvs);

    if (err) {

        goto err_cmd_add;

    }



    err = of_dpa_group_add(of_dpa, group);

    if (err) {

        goto err_cmd_add;

    }



    return ROCKER_OK;



err_cmd_add:

    g_free(group);

    return err;

}

    if (!group) {         return -ROCKER_ENOMEM;         return -ROCKER_ENOMEM;     if (!group) {         return -ROCKER_ENOMEM;
static int FUNC_0(OfDpa *VAR_0, uint32_t VAR_1,

                                RockerTlv **VAR_2)

{

    OfDpaGroup *group = of_dpa_group_find(VAR_0, VAR_1);

    int VAR_3;



    if (group) {

        return -ROCKER_EEXIST;

    }



    group = of_dpa_group_alloc(VAR_1);

    if (!group) {

        return -ROCKER_ENOMEM;

    }



    VAR_3 = of_dpa_cmd_group_do(VAR_0, VAR_1, group, VAR_2);

    if (VAR_3) {

        goto err_cmd_add;

    }



    VAR_3 = of_dpa_group_add(VAR_0, group);

    if (VAR_3) {

        goto err_cmd_add;

    }



    return ROCKER_OK;



err_cmd_add:

    g_free(group);

    return VAR_3;

}

static int FUNC_0(OfDpa *VAR_0, uint32_t VAR_1,
RockerTlv **VAR_2)
{ OfDpaGroup *group = of_dpa_group_find(VAR_0, VAR_1); int VAR_3; if (group) { return -ROCKER_EEXIST; } group = of_dpa_group_alloc(VAR_1); if (!group) { return -ROCKER_ENOMEM; } VAR_3 = of_dpa_cmd_group_do(VAR_0, VAR_1, group, VAR_2); if (VAR_3) { goto err_cmd_add; } VAR_3 = of_dpa_group_add(VAR_0, group); if (VAR_3) { goto err_cmd_add; } return ROCKER_OK; err_cmd_add:
g_free(group); return VAR_3; }