Skip to content

Commit

Permalink
Merge pull request sonic-net#4 from vasant17/FIX_RETURN_CODE
Browse files Browse the repository at this point in the history
Return correct error code
  • Loading branch information
zhenggen-xu authored Feb 27, 2020
2 parents 1d2d0ad + 72f1fcf commit 7a694b9
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions meta/sai_meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1824,14 +1824,6 @@ sai_status_t meta_port_remove_validation(
return SAI_STATUS_SUCCESS;
}

if (object_reference_count(port_id) != 0)
{
SWSS_LOG_ERROR("port %s reference count is not zero, can't remove",
sai_serialize_object_id(port_id).c_str());

return SAI_STATUS_OBJECT_IN_USE;
}

if (!meta_is_object_in_default_state(port_id))
{
SWSS_LOG_ERROR("port %s is not in default state, can't remove",
Expand Down Expand Up @@ -1943,7 +1935,7 @@ sai_status_t meta_generic_validation_remove(

SWSS_LOG_ERROR("object 0x%" PRIx64 " reference count is %d, can't remove", oid, count);

return SAI_STATUS_INVALID_PARAMETER;
return SAI_STATUS_OBJECT_IN_USE;
}

if (meta_key.objecttype == SAI_OBJECT_TYPE_PORT)
Expand Down

0 comments on commit 7a694b9

Please sign in to comment.