vhost-user-blk/scsi: Fix broken error handling for socket call
commit91010f0407a07caeacb11037bb5b493bab7ce203
authorAlexChen <alex.chen@huawei.com>
Thu, 29 Oct 2020 06:03:52 +0000 (29 14:03 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 17 Nov 2020 09:16:55 +0000 (17 04:16 -0500)
tree209aa0fdd3aeb59e5abb6e52eed8d50505451161
parent5fd6921cccdbc1428c888d451026ee4fd152c936
vhost-user-blk/scsi: Fix broken error handling for socket call

When socket() fails, it returns -1, 0 is the normal return value and should not return error.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: AlexChen <alex.chen@huawei.com>
Message-Id: <5F9A5B48.9030509@huawei.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
contrib/vhost-user-blk/vhost-user-blk.c
contrib/vhost-user-scsi/vhost-user-scsi.c