vdpasim: Return status in vdpasim_get_status

vdpasim->status should acquired under spin lock.

Fixes: 870448c31775 ("vdpasim: vDPA device simulator")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20200402024916.35192-1-yuehaibing@huawei.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
YueHaibing 2020-04-02 10:49:16 +08:00 committed by Michael S. Tsirkin
parent cf29b1ceb6
commit 21818ed0c6
1 changed files with 1 additions and 1 deletions

View File

@ -488,7 +488,7 @@ static u8 vdpasim_get_status(struct vdpa_device *vdpa)
status = vdpasim->status; status = vdpasim->status;
spin_unlock(&vdpasim->lock); spin_unlock(&vdpasim->lock);
return vdpasim->status; return status;
} }
static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status) static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status)