Skip to content

Commit

Permalink
prov/efa: Always return efa_prov in EFA_INI
Browse files Browse the repository at this point in the history
Currently EFA_INI only return efa_prov
when there is efa device and the device info
setup correctly. This makes fi_getinfo
with FI_PROV_ATTR_ONLY not return efa
on non-efa instances. This patch
fixes it.

Signed-off-by: Shi Jin <sjina@amazon.com>
  • Loading branch information
shijin-aws committed Feb 18, 2025
1 parent de4f29d commit b7b9dd6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions prov/efa/src/efa_prov.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,7 @@ EFA_INI

err = efa_device_list_initialize();
if (err)
return NULL;

if (g_device_cnt <= 0)
return NULL;
return &efa_prov;

/*
* efa_env_initialize uses g_efa_device_list
Expand Down Expand Up @@ -236,7 +233,7 @@ EFA_INI

err_free:
efa_prov_finalize();
return NULL;
return &efa_prov;
}

/**
Expand Down

0 comments on commit b7b9dd6

Please sign in to comment.