acrn-hypervisor/devicemodel/hw
Shiqing Gao b435c74e91 dm: fix the error code issues in passthrough.c
With current implementation:
vm_init_vdevs only handles the negative error code, while passthru_init
returns positive error code when error occurs.
This causes unexpected dm crash since the real error is not being
handled properly.

What this patch does:
Change the error code to be negative value in passthru_init because it
is common in Linux kernel to return negative value when error occurs.

v2 -> v3
* add more comments about the reason to convert the return value

v1 -> v2:
* add a wrapper API to convert the error returned from pci_system_init
  to the ERROR we defined in DM
* use the defined errno as the return value rather than -1

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-08 12:05:25 +08:00
..
pci dm: fix the error code issues in passthrough.c 2018-06-08 12:05:25 +08:00
platform DM: cleanup for header inclusions 2018-06-07 14:35:30 +08:00
block_if.c DM: cleanup for header inclusions 2018-06-07 14:35:30 +08:00
uart_core.c DM: cleanup for header inclusions 2018-06-07 14:35:30 +08:00
usb_core.c DM: cleanup for header inclusions 2018-06-07 14:35:30 +08:00