netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 9p: fix: Uninitialized variable p.
@ 2020-12-30  6:45 YANG LI
  2020-12-30  7:17 ` Dominique Martinet
  0 siblings, 1 reply; 2+ messages in thread
From: YANG LI @ 2020-12-30  6:45 UTC (permalink / raw)
  To: asmadeus
  Cc: davem, kuba, ericvh, lucho, v9fs-developer, netdev, linux-kernel,
	YANG LI

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@linux.alibaba.com>
Reported-by: Abaci <abaci@linux.alibaba.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-30  7:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-30  6:45 [PATCH] 9p: fix: Uninitialized variable p YANG LI
2020-12-30  7:17 ` Dominique Martinet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).