mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-17 12:46:27 +00:00
create_and_open_dev() returns a (-errno), so the "if (iser_fd...)" check should
detect *any* negative return value as a case when fd should be set to -1. Signed-off-by: David Butterfield <dab21774@gmail.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7108 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -232,14 +232,15 @@ static void create_iser_listen_socket(struct pollfd *array)
|
||||
|
||||
iser_fd = create_and_open_dev("isert_scst", 1);
|
||||
|
||||
poll_array[POLL_ISER_LISTEN].fd = iser_fd;
|
||||
if (iser_fd != -1) {
|
||||
if (iser_fd >= 0) {
|
||||
poll_array[POLL_ISER_LISTEN].fd = iser_fd;
|
||||
poll_array[POLL_ISER_LISTEN].events = POLLIN;
|
||||
|
||||
/* RDMAExtensions */
|
||||
session_keys[key_rdma_extensions].max = 1;
|
||||
session_keys[key_rdma_extensions].local_def = 1;
|
||||
} else {
|
||||
poll_array[POLL_ISER_LISTEN].fd = -1;
|
||||
poll_array[POLL_ISER_LISTEN].events = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user