diff options
| author | Keith Busch <kbusch@kernel.org> | 2025-02-27 15:06:30 -0800 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-03-01 02:52:52 -0500 |
| commit | cb380909ae3b1ebf14d6a455a4f92d7916d790cb (patch) | |
| tree | dd3d246e73d00711c6c1ed0fc6a2cce1a73c6c6d /drivers/vhost | |
| parent | 982caaa1150479f022003390cd72a1941663d211 (diff) | |
| download | linux-cb380909ae3b1ebf14d6a455a4f92d7916d790cb.tar.gz linux-cb380909ae3b1ebf14d6a455a4f92d7916d790cb.tar.bz2 linux-cb380909ae3b1ebf14d6a455a4f92d7916d790cb.zip | |
vhost: return task creation error instead of NULL
Lets callers distinguish why the vhost task creation failed. No one
currently cares why it failed, so no real runtime change from this
patch, but that will not be the case for long.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Message-ID: <20250227230631.303431-2-kbusch@meta.com>
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'drivers/vhost')
| -rw-r--r-- | drivers/vhost/vhost.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 9ac25d08f473..63612faeab72 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -666,7 +666,7 @@ static struct vhost_worker *vhost_worker_create(struct vhost_dev *dev) vtsk = vhost_task_create(vhost_run_work_list, vhost_worker_killed, worker, name); - if (!vtsk) + if (IS_ERR(vtsk)) goto free_worker; mutex_init(&worker->mutex); |
