Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2466d4b9 authored by Pan Bian's avatar Pan Bian Committed by Juergen Gross
Browse files

xen: xenbus: set error code on failure



Variable err is initialized with 0. As a result, the return value may
be 0 even if get_zeroed_page() fails to allocate memory. This patch fixes
the bug, initializing err with "-ENOMEM".

Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
parent 0fdb4744
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -702,7 +702,7 @@ device_initcall(xenbus_probe_initcall);
 */
static int __init xenstored_local_init(void)
{
	int err = 0;
	int err = -ENOMEM;
	unsigned long page = 0;
	struct evtchn_alloc_unbound alloc_unbound;