]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xen: xenbus: set error code on failure
authorPan Bian <bianpan2016@163.com>
Mon, 5 Dec 2016 08:22:22 +0000 (16:22 +0800)
committerJuergen Gross <jgross@suse.com>
Thu, 8 Dec 2016 06:53:57 +0000 (07:53 +0100)
commit2466d4b9d0c21e6c28cd63516dea65806bf5a307
tree662e90240df2d3654ed2bb66b63b9be966571b56
parent0fdb47440203ce06e09923c4d578cf3c20aef69a
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: Pan Bian <bianpan2016@163.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/xenbus/xenbus_probe.c