Skip to content

Commit f8bb3ed

Browse files
Dan Carpenterairlied
authored andcommitted
drm/nouveau/tegra: Fix error pointer vs NULL return in nvkm_device_tegra_resource_addr()
The nvkm_device_tegra_resource() function returns a mix of error pointers and NULL. The callers only expect it to return NULL on error. Change it to only return NULL. Fixes: 76b8f81 ("drm/nouveau: improve handling of 64-bit BARs") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Timur Tabi <ttabi@nvidia.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://lore.kernel.org/dri-devel/334404bdf60765cb5a8e855a74c688bc537531ee.camel@nvidia.com/T/#t
1 parent 002619c commit f8bb3ed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/gpu/drm/nouveau/nvkm/engine/device

drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ nvkm_device_tegra_resource(struct nvkm_device *device, enum nvkm_bar_id bar)
196196
case NVKM_BAR1_FB : idx = 1; break;
197197
default:
198198
WARN_ON(1);
199-
return ERR_PTR(-EINVAL);
199+
return NULL;
200200
}
201201

202202
return platform_get_resource(tdev->pdev, IORESOURCE_MEM, idx);

0 commit comments

Comments
 (0)