diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c index 1ef9436ef..d0e7edbda 100644 --- a/lib/vhost/vhost.c +++ b/lib/vhost/vhost.c @@ -373,7 +373,7 @@ static int vhost_session_set_coalescing(struct spdk_vhost_dev *vdev, struct spdk_vhost_session *vsession, void *ctx) { - if (vdev == NULL || vsession == NULL) { + if (vsession == NULL) { /* nothing to do */ return 0; } diff --git a/lib/vhost/vhost_blk.c b/lib/vhost/vhost_blk.c index a8b702a97..cc978d41b 100644 --- a/lib/vhost/vhost_blk.c +++ b/lib/vhost/vhost_blk.c @@ -563,11 +563,6 @@ vhost_session_bdev_remove_cb(struct spdk_vhost_dev *vdev, { struct spdk_vhost_blk_session *bvsession; - if (vdev == NULL) { - /* Nothing to do */ - return 0; - } - if (vsession == NULL) { /* All sessions have been notified, time to close the bdev */ struct spdk_vhost_blk_dev *bvdev = to_blk_dev(vdev); diff --git a/lib/vhost/vhost_internal.h b/lib/vhost/vhost_internal.h index ce0246258..ac958e33e 100644 --- a/lib/vhost/vhost_internal.h +++ b/lib/vhost/vhost_internal.h @@ -193,9 +193,7 @@ struct spdk_vhost_dev { /** * Synchronized vhost session event used for backend callbacks. * - * \param vdev vhost device. If the device has been deleted - * in the meantime, this function will be called one last - * time with vdev == NULL. + * \param vdev vhost device. * \param vsession vhost session. If all sessions have been * iterated through, this function will be called one last * time with vsession == NULL.