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:
parent
cf29b1ceb6
commit
21818ed0c6
|
@ -488,7 +488,7 @@ static u8 vdpasim_get_status(struct vdpa_device *vdpa)
|
|||
status = vdpasim->status;
|
||||
spin_unlock(&vdpasim->lock);
|
||||
|
||||
return vdpasim->status;
|
||||
return status;
|
||||
}
|
||||
|
||||
static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status)
|
||||
|
|
Loading…
Reference in New Issue