vhost: fix error code check when creating thread
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 8 Dec 2017 10:19:49 +0000 (11:19 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
commitda51d2f6b8b652da8eb9d4b50df4f3f5a24b656f
tree7b7edfd24a25452f4f26ab05d04a5dc9bd16e3c7
parent240da8b2143b7be372cf6388f028b26b15f16776
vhost: fix error code check when creating thread

On error, pthread_create() returns a positive number (errno).
Fix the test on the return value.

Fixes: af1475918124 ("vhost: introduce API to start a specific driver")
Fixes: e623e0c6d8a5 ("vhost: add reconnect ability")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
lib/librte_vhost/socket.c