diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-09-17 10:20:09 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-09-17 13:00:41 -0400 |
commit | c468bdee28a1cb61d9b7a8ce9859d17dee43b7d7 (patch) | |
tree | 92402ff7a4338dbf7227f8f50c9898c30416e62a /drivers/xen/swiotlb-xen.c | |
parent | b82776005369899c1c7ca2e4b2414bb64b538d2c (diff) |
xen/swiotlb: For early initialization, return zero on success.
If everything is setup properly we would return -ENOMEM since
rc by default is set to that value. Lets not do that and return
a proper return code.
Note: The reason the early code needs this special treatment
is that it SWIOTLB library call does not return anything (and
had it failed it would call panic()) - but our function does.
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/swiotlb-xen.c')
-rw-r--r-- | drivers/xen/swiotlb-xen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 7461edb5118e..b70f2d19ab99 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c | |||
@@ -230,9 +230,10 @@ retry: | |||
230 | goto error; | 230 | goto error; |
231 | } | 231 | } |
232 | start_dma_addr = xen_virt_to_bus(xen_io_tlb_start); | 232 | start_dma_addr = xen_virt_to_bus(xen_io_tlb_start); |
233 | if (early) | 233 | if (early) { |
234 | swiotlb_init_with_tbl(xen_io_tlb_start, xen_io_tlb_nslabs, verbose); | 234 | swiotlb_init_with_tbl(xen_io_tlb_start, xen_io_tlb_nslabs, verbose); |
235 | else | 235 | rc = 0; |
236 | } else | ||
236 | rc = swiotlb_late_init_with_tbl(xen_io_tlb_start, xen_io_tlb_nslabs); | 237 | rc = swiotlb_late_init_with_tbl(xen_io_tlb_start, xen_io_tlb_nslabs); |
237 | return rc; | 238 | return rc; |
238 | error: | 239 | error: |