diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2014-01-07 08:11:05 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2014-01-07 09:59:51 -0500 |
commit | 89b9e08f186a203c250872a663c9eab09cdc583a (patch) | |
tree | 6d8ab4c1fd8e6dd3d44af77dbabfc88ad6724828 | |
parent | 5602aba808aa5440e4b8fa4340079cb2047651ee (diff) |
xen-platform: fix error return code in platform_pci_init()
Fix to return a negative error code from the error handling
case instead of 0, otherwise the error condition cann't be
reflected from the return value.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-rw-r--r-- | drivers/xen/platform-pci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c index f1947ac218d9..a1361c312c06 100644 --- a/drivers/xen/platform-pci.c +++ b/drivers/xen/platform-pci.c | |||
@@ -156,7 +156,8 @@ static int platform_pci_init(struct pci_dev *pdev, | |||
156 | 156 | ||
157 | max_nr_gframes = gnttab_max_grant_frames(); | 157 | max_nr_gframes = gnttab_max_grant_frames(); |
158 | grant_frames = alloc_xen_mmio(PAGE_SIZE * max_nr_gframes); | 158 | grant_frames = alloc_xen_mmio(PAGE_SIZE * max_nr_gframes); |
159 | if (gnttab_setup_auto_xlat_frames(grant_frames)) | 159 | ret = gnttab_setup_auto_xlat_frames(grant_frames); |
160 | if (ret) | ||
160 | goto out; | 161 | goto out; |
161 | ret = gnttab_init(); | 162 | ret = gnttab_init(); |
162 | if (ret) | 163 | if (ret) |