[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200402024916.35192-1-yuehaibing@huawei.com>
Date: Thu, 2 Apr 2020 10:49:16 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <mst@...hat.com>, <jasowang@...hat.com>, <yuehaibing@...wei.com>
CC: <virtualization@...ts.linux-foundation.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH v3 -next] 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@...wei.com>
Acked-by: Jason Wang <jasowang@...hat.com>
---
v3: rework based on commit a4be40cbcedb ("vdpa: move to drivers/vdpa")
v2: Fix patch title typo
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.17.1
Powered by blists - more mailing lists