summaryrefslogtreecommitdiff
path: root/drivers/vdpa
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2020-04-02 05:49:16 +0300
committerMichael S. Tsirkin <mst@redhat.com>2020-04-17 01:31:06 +0300
commit21818ed0c6f08228c7d0f99cb74a934b624665f7 (patch)
treeb16d2f97909da7a1f79f5828d81bfb351af38d1b /drivers/vdpa
parentcf29b1ceb69db61c9b45a6ed45923d740f8b8dac (diff)
downloadlinux-21818ed0c6f08228c7d0f99cb74a934b624665f7.tar.xz
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>
Diffstat (limited to 'drivers/vdpa')
-rw-r--r--drivers/vdpa/vdpa_sim/vdpa_sim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index 6e8a0cf2fdeb..72863d01a12a 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
@@ -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)