From: Wei Yongjun <[email protected]>
Fix to return -EFAULT from the error handling case instead of 0 when
version mismatch with pcifront.
Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/xen/xen-pciback/xenbus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c
index 4a7e6e0..c214daa 100644
--- a/drivers/xen/xen-pciback/xenbus.c
+++ b/drivers/xen/xen-pciback/xenbus.c
@@ -174,6 +174,7 @@ static int xen_pcibk_attach(struct xen_pcibk_device *pdev)
"version mismatch (%s/%s) with pcifront - "
"halting " DRV_NAME,
magic, XEN_PCI_MAGIC);
+ err = -EFAULT;
goto out;
}
>>> On 20.07.14 at 07:46, <[email protected]> wrote:
> --- a/drivers/xen/xen-pciback/xenbus.c
> +++ b/drivers/xen/xen-pciback/xenbus.c
> @@ -174,6 +174,7 @@ static int xen_pcibk_attach(struct xen_pcibk_device *pdev)
> "version mismatch (%s/%s) with pcifront - "
> "halting " DRV_NAME,
> magic, XEN_PCI_MAGIC);
> + err = -EFAULT;
> goto out;
> }
>
While -EFAULT is kind of odd here, I realize this is because the same
also gets passed to xenbus_dev_fatal(); -EILSEQ, -ENODATA, or
-EPROTO (despite it normally being network specific) would seem
better to me.
In any event
Reviewed-by Jan Beulich <[email protected]>
On 20/07/14 06:46, [email protected] wrote:
> From: Wei Yongjun <[email protected]>
>
> Fix to return -EFAULT from the error handling case instead of 0 when
> version mismatch with pcifront.
Applied to devel/for-linus-3.16
Although the return value of this function is never used.
David