weiyj_lk at 163.com
2016-Jul-06 12:23 UTC
[Nouveau] [PATCH -next] drm/nouveau/device: fix return value check in nvkm_device_tegra_probe_iommu()
From: Wei Yongjun <yongjun_wei at trendmicro.com.cn> In case of error, the function iommu_domain_alloc() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn> --- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c index ec12efb..2ed025d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c @@ -102,7 +102,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev) if (iommu_present(&platform_bus_type)) { tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type); - if (IS_ERR(tdev->iommu.domain)) + if (!tdev->iommu.domain) goto error; /*
Alexandre Courbot
2016-Jul-06 13:32 UTC
[Nouveau] [PATCH -next] drm/nouveau/device: fix return value check in nvkm_device_tegra_probe_iommu()
On Wed, Jul 6, 2016 at 9:23 PM, <weiyj_lk at 163.com> wrote:> From: Wei Yongjun <yongjun_wei at trendmicro.com.cn> > > In case of error, the function iommu_domain_alloc() returns NULL > pointer not ERR_PTR(). The IS_ERR() test in the return value check > should be replaced with NULL test.Reviewed-by: Alexandre Courbot <acourbot at nvidia.com> Thanks!
Reasonably Related Threads
- [PATCH -next] drm/nouveau/device: fix return value check in nvkm_device_tegra_probe_iommu()
- [PATCH] drm/nouveau/tegra: Modify error handling
- [PATCH] drm/nouveau/tegra: Fix error handling
- [PATCH -next] drm/virtio: Fix non static symbol warning
- [PATCH -next] drm/virtio: Fix non static symbol warning