mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH next] drm/tegra: Fix NULL vs IS_ERR() check in probe()
@ 2024-09-13 14:34 Dan Carpenter
  2024-09-14  2:02 ` Baolu Lu
  2024-10-24 16:50 ` Thierry Reding
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2024-09-13 14:34 UTC (permalink / raw)
  To: Lu Baolu
  Cc: Thierry Reding, Mikko Perttunen, David Airlie, Simona Vetter,
	Jonathan Hunter, Lyude Paul, dri-devel, linux-tegra,
	linux-kernel, kernel-janitors

The iommu_paging_domain_alloc() function doesn't  return NULL pointers,
it returns error pointers.  Update the check to match.

Fixes: 45c690aea8ee ("drm/tegra: Use iommu_paging_domain_alloc()")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/gpu/drm/tegra/drm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index c9eb329665ec..34d22ba210b0 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -1153,8 +1153,8 @@ static int host1x_drm_probe(struct host1x_device *dev)
 
 	if (host1x_drm_wants_iommu(dev) && device_iommu_mapped(dma_dev)) {
 		tegra->domain = iommu_paging_domain_alloc(dma_dev);
-		if (!tegra->domain) {
-			err = -ENOMEM;
+		if (IS_ERR(tegra->domain)) {
+			err = PTR_ERR(tegra->domain);
 			goto free;
 		}
 
-- 
2.45.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH next] drm/tegra: Fix NULL vs IS_ERR() check in probe()
  2024-09-13 14:34 [PATCH next] drm/tegra: Fix NULL vs IS_ERR() check in probe() Dan Carpenter
@ 2024-09-14  2:02 ` Baolu Lu
  2024-10-24 16:50 ` Thierry Reding
  1 sibling, 0 replies; 3+ messages in thread
From: Baolu Lu @ 2024-09-14  2:02 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: baolu.lu, Thierry Reding, Mikko Perttunen, David Airlie,
	Simona Vetter, Jonathan Hunter, Lyude Paul, dri-devel,
	linux-tegra, linux-kernel, kernel-janitors

On 9/13/24 10:34 PM, Dan Carpenter wrote:
> The iommu_paging_domain_alloc() function doesn't  return NULL pointers,
> it returns error pointers.  Update the check to match.
> 
> Fixes: 45c690aea8ee ("drm/tegra: Use iommu_paging_domain_alloc()")
> Signed-off-by: Dan Carpenter<dan.carpenter@linaro.org>
> ---
>   drivers/gpu/drm/tegra/drm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>

Thanks,
baolu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH next] drm/tegra: Fix NULL vs IS_ERR() check in probe()
  2024-09-13 14:34 [PATCH next] drm/tegra: Fix NULL vs IS_ERR() check in probe() Dan Carpenter
  2024-09-14  2:02 ` Baolu Lu
@ 2024-10-24 16:50 ` Thierry Reding
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2024-10-24 16:50 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Lu Baolu, Mikko Perttunen, David Airlie, Simona Vetter,
	Jonathan Hunter, Lyude Paul, dri-devel, linux-tegra,
	linux-kernel, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

On Fri, Sep 13, 2024 at 05:34:54PM +0300, Dan Carpenter wrote:
> The iommu_paging_domain_alloc() function doesn't  return NULL pointers,
> it returns error pointers.  Update the check to match.
> 
> Fixes: 45c690aea8ee ("drm/tegra: Use iommu_paging_domain_alloc()")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/gpu/drm/tegra/drm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-24 16:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-13 14:34 [PATCH next] drm/tegra: Fix NULL vs IS_ERR() check in probe() Dan Carpenter
2024-09-14  2:02 ` Baolu Lu
2024-10-24 16:50 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®