summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2025-05-23 19:07:58 +0300
committerDave Airlie <airlied@redhat.com>2025-05-24 14:36:07 +1000
commitf8bb3ed3197966fb60bedcbdc126d2bd5bc0a77f (patch)
tree09f80aebc35341fc45439a77b38940f584027612 /drivers/gpu/drm/nouveau
parent002619c8736ca2125070ffef74d4617ba2406620 (diff)
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: 76b8f81a5b92 ("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
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
index 0ca2dfe99676..114e50ca1827 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
@@ -196,7 +196,7 @@ nvkm_device_tegra_resource(struct nvkm_device *device, enum nvkm_bar_id bar)
case NVKM_BAR1_FB : idx = 1; break;
default:
WARN_ON(1);
- return ERR_PTR(-EINVAL);
+ return NULL;
}
return platform_get_resource(tdev->pdev, IORESOURCE_MEM, idx);