xen-platform: fix error return code in platform_pci_init()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 7 Jan 2014 13:11:05 +0000 (21:11 +0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 7 Jan 2014 14:59:51 +0000 (09:59 -0500)
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>
drivers/xen/platform-pci.c

index f1947ac218d99fa533d3f2257886ed91f6b3211e..a1361c312c06a2eb426435dfa8138460c01eb3c4 100644 (file)
@@ -156,7 +156,8 @@ static int platform_pci_init(struct pci_dev *pdev,
 
        max_nr_gframes = gnttab_max_grant_frames();
        grant_frames = alloc_xen_mmio(PAGE_SIZE * max_nr_gframes);
-       if (gnttab_setup_auto_xlat_frames(grant_frames))
+       ret = gnttab_setup_auto_xlat_frames(grant_frames);
+       if (ret)
                goto out;
        ret = gnttab_init();
        if (ret)