Skip to content

Commit

Permalink
Merge branch 'master' into rrojo/vfio_plugin_refactor_enum
Browse files Browse the repository at this point in the history
  • Loading branch information
r-rojo committed Jan 19, 2021
2 parents 00191af + 86282f4 commit 2224392
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions plugins/vfio/opae_vfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,14 +1140,19 @@ fpga_result vfio_fpgaGetIOAddress(fpga_handle handle, uint64_t wsid,
return FPGA_EXCEPTION;
}
vfio_buffer *ptr = _vfio_buffers;
fpga_result res = FPGA_OK;
while (ptr) {
if (ptr->wsid == wsid) {
*ioaddr = ptr->iova;
return FPGA_OK;
goto out_unlock;
}
ptr = ptr->next;
}

return FPGA_NOT_FOUND;
res = FPGA_NOT_FOUND;
out_unlock:
if (pthread_mutex_unlock(&_buffers_mutex)) {
OPAE_MSG("error unlocking buffers mutex");
}
return res;
}

0 comments on commit 2224392

Please sign in to comment.