From 52a48831147a77845ff9e6f9dafb0e423b611610 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Wed, 4 May 2016 09:52:49 +0300 Subject: gpu: nvgpu: fix copy-paste error with bar1 ioremap If bar1 resource remap fails during initialization, return the correct error code from g->bar1 instead of g->regs. Coverity ID 32068 Bug 200192125 Signed-off-by: Konsta Holtta Change-Id: Ia326bfa122259c7b3402f78746673612f0ac0009 Reviewed-on: http://git-master/r/1141078 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/pci.c') diff --git a/drivers/gpu/nvgpu/pci.c b/drivers/gpu/nvgpu/pci.c index 38a4ad10..5578dd8b 100644 --- a/drivers/gpu/nvgpu/pci.c +++ b/drivers/gpu/nvgpu/pci.c @@ -112,7 +112,7 @@ static int nvgpu_pci_init_support(struct pci_dev *pdev) pci_resource_len(pdev, 1)); if (IS_ERR(g->bar1)) { gk20a_err(dev_from_gk20a(g), "failed to remap gk20a bar1"); - err = PTR_ERR(g->regs); + err = PTR_ERR(g->bar1); goto fail; } -- cgit v1.2.2