mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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]>
This commit is contained in:
parent
29985b0961
commit
31d47266c6
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue