Skip to content

Commit 3796e6f

Browse files
committed
Fix condition in devdax_open_ipc_handle()
Fix condition in devdax_open_ipc_handle(). os_devdax_open() returns -1 on error. It fixes the Coverity issue no. 468935. Signed-off-by: Lukasz Dorau <[email protected]>
1 parent 55db2a3 commit 3796e6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/provider/provider_devdax_memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ static umf_result_t devdax_open_ipc_handle(void *provider,
446446

447447
umf_result_t ret = UMF_RESULT_SUCCESS;
448448
int fd = os_devdax_open(devdax_provider->path);
449-
if (fd <= 0) {
449+
if (fd == -1) {
450450
LOG_PERR("opening a devdax (%s) failed", devdax_provider->path);
451451
return UMF_RESULT_ERROR_INVALID_ARGUMENT;
452452
}

0 commit comments

Comments
 (0)