bhyve: Initialize the return value in blockif_register_resize_callback()

MFC after:	1 week
This commit is contained in:
Mark Johnston 2022-10-08 11:26:38 -04:00
parent 3dddf73ee1
commit 5b966d7871

View File

@ -694,6 +694,8 @@ blockif_register_resize_callback(struct blockif_ctxt *bc, blockif_resize_cb *cb,
if (cb == NULL)
return (EINVAL);
err = 0;
pthread_mutex_lock(&bc->bc_mtx);
if (bc->bc_resize_cb != NULL) {
err = EBUSY;