diff options
author | YueHaibing <yuehaibing@huawei.com> | 2020-04-02 10:49:16 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-04-16 18:31:06 -0400 |
commit | 21818ed0c6f08228c7d0f99cb74a934b624665f7 (patch) | |
tree | b16d2f97909da7a1f79f5828d81bfb351af38d1b | |
parent | cf29b1ceb69db61c9b45a6ed45923d740f8b8dac (diff) | |
download | linux-21818ed0c6f08228c7d0f99cb74a934b624665f7.tar.bz2 |
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>
-rw-r--r-- | drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 |
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) |