[PATCH] 9p: fix: Uninitialized variable p.

From: YANG LI
Date: Wed Dec 30 2020 - 01:46:20 EST


The pointer p is being used but it isn't being initialized,
need to assign a NULL to it.

Signed-off-by: YANG LI <abaci-bugfix@xxxxxxxxxxxxxxxxx>
Reported-by: Abaci <abaci@xxxxxxxxxxxxxxxxx>
---
net/9p/trans_virtio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 93f2f86..d4d635f 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -342,7 +342,7 @@ static int p9_get_mapped_pages(struct virtio_chan *chan,
/* kernel buffer, no need to pin pages */
int index;
size_t len;
- void *p;
+ void *p = NULL;

/* we'd already checked that it's non-empty */
while (1) {
--
1.8.3.1