diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2016-05-04 02:52:49 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-05 21:21:17 -0400 |
commit | 52a48831147a77845ff9e6f9dafb0e423b611610 (patch) | |
tree | 64a92e0b31eee02d3d8d84858e56a24f63cebd75 /drivers/gpu/nvgpu/pci.c | |
parent | eac46a64c0c78d87c51330809b196b3e92c92c9e (diff) |
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 <kholtta@nvidia.com>
Change-Id: Ia326bfa122259c7b3402f78746673612f0ac0009
Reviewed-on: http://git-master/r/1141078
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/pci.c')
-rw-r--r-- | drivers/gpu/nvgpu/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
112 | pci_resource_len(pdev, 1)); | 112 | pci_resource_len(pdev, 1)); |
113 | if (IS_ERR(g->bar1)) { | 113 | if (IS_ERR(g->bar1)) { |
114 | gk20a_err(dev_from_gk20a(g), "failed to remap gk20a bar1"); | 114 | gk20a_err(dev_from_gk20a(g), "failed to remap gk20a bar1"); |
115 | err = PTR_ERR(g->regs); | 115 | err = PTR_ERR(g->bar1); |
116 | goto fail; | 116 | goto fail; |
117 | } | 117 | } |
118 | 118 | ||