aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Stabellini <[email protected]>2017-04-13 10:57:56 -0700
committerJuergen Gross <[email protected]>2017-05-02 11:13:23 +0200
commit31d47266c6e599d76e84c9809f9ea2735d9cda5b (patch)
tree675cd7a2b5f9af5d922aa9f1e50f2ff65f9782c9
parent29985b09613ba106a1ed0496988636d288600515 (diff)
xen/9pfs: initialize len to 0 to detect xenbus_read errors
In order to use "len" to check for xenbus_read errors properly, we need to initialize len to 0 before passing it to xenbus_read. CC: [email protected] CC: [email protected] CC: [email protected] CC: Eric Van Hensbergen <[email protected]> CC: Ron Minnich <[email protected]> CC: Latchesar Ionkov <[email protected]> CC: [email protected] Signed-off-by: Stefano Stabellini <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Signed-off-by: Juergen Gross <[email protected]>
-rw-r--r--net/9p/trans_xen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
index 47864245c0d4..71e85643b3f9 100644
--- a/net/9p/trans_xen.c
+++ b/net/9p/trans_xen.c
@@ -386,7 +386,7 @@ static int xen_9pfs_front_probe(struct xenbus_device *dev,
struct xenbus_transaction xbt;
struct xen_9pfs_front_priv *priv = NULL;
char *versions;
- unsigned int max_rings, max_ring_order, len;
+ unsigned int max_rings, max_ring_order, len = 0;
versions = xenbus_read(XBT_NIL, dev->otherend, "versions", &len);
if (!len)