diff options
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_repr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_repr.c b/drivers/net/ethernet/intel/ice/ice_repr.c index 00d4a9125dfa..970a99a52bf1 100644 --- a/drivers/net/ethernet/intel/ice/ice_repr.c +++ b/drivers/net/ethernet/intel/ice/ice_repr.c @@ -452,8 +452,8 @@ struct ice_repr *ice_repr_create_vf(struct ice_vf *vf) return ERR_PTR(-EINVAL); repr = ice_repr_create(vsi); - if (!repr) - return ERR_PTR(-ENOMEM); + if (IS_ERR(repr)) + return repr; repr->type = ICE_REPR_TYPE_VF; repr->vf = vf; @@ -501,8 +501,8 @@ struct ice_repr *ice_repr_create_sf(struct ice_dynamic_port *sf) { struct ice_repr *repr = ice_repr_create(sf->vsi); - if (!repr) - return ERR_PTR(-ENOMEM); + if (IS_ERR(repr)) + return repr; repr->type = ICE_REPR_TYPE_SF; repr->sf = sf; |