From: Wei Yongjun Date: Tue, 7 Jan 2014 13:11:05 +0000 (+0800) Subject: xen-platform: fix error return code in platform_pci_init() X-Git-Tag: firefly_0821_release~176^2~4328^2~18 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=89b9e08f186a203c250872a663c9eab09cdc583a;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Konrad Rzeszutek Wilk --- 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, 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)