X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvhost_scsi%2Fvhost_scsi.c;h=a92630c77c40374da386131ae7e21ab56ef3144a;hb=47ac243ac4ced228da5d55bfc9121a8e466dbe01;hp=2908ff68b71c43c74e8adc96fb9925f13e6751b9;hpb=a3258d299378e33609409b36aebd987bc15033ea;p=dpdk.git diff --git a/examples/vhost_scsi/vhost_scsi.c b/examples/vhost_scsi/vhost_scsi.c index 2908ff68b7..a92630c77c 100644 --- a/examples/vhost_scsi/vhost_scsi.c +++ b/examples/vhost_scsi/vhost_scsi.c @@ -285,6 +285,12 @@ ctrlr_worker(void *arg) cpu_set_t cpuset; pthread_t thread; + if (ctrlr == NULL || ctrlr->bdev == NULL) { + fprintf(stderr, "%s: Error, invalid argument passed to worker thread\n", + __func__); + exit(0); + } + thread = pthread_self(); CPU_ZERO(&cpuset); CPU_SET(0, &cpuset); @@ -479,4 +485,3 @@ int main(int argc, char *argv[]) return 0; } -