summaryrefslogtreecommitdiffstats
path: root/drivers/vdpa
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2020-04-02 04:49:16 +0200
committerMichael S. Tsirkin <mst@redhat.com>2020-04-17 00:31:06 +0200
commit21818ed0c6f08228c7d0f99cb74a934b624665f7 (patch)
treeb16d2f97909da7a1f79f5828d81bfb351af38d1b /drivers/vdpa
parentvdpa: remove unused variables 'ifcvf' and 'ifcvf_lm' (diff)
downloadlinux-21818ed0c6f08228c7d0f99cb74a934b624665f7.tar.xz
linux-21818ed0c6f08228c7d0f99cb74a934b624665f7.zip
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)