[PATCH 2/5] drm/i915: i915_dma_map_single returns positive error codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i915_dma_map_single relies on dma_mapping_error, which returns positive
error codes. Found by static checker.

Introduced by commit 678d96fbb3b5995a2fdff2bca5e1ab4a40b7e968
("drm/i915: Track GEN6 page table usage").

Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
Signed-off-by: Michel Thierry <michel.thierry@xxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 645c363..79ade6f 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -348,7 +348,7 @@ static struct i915_page_table_entry *alloc_pt_single(struct drm_device *dev)
 		goto fail_page;
 
 	ret = i915_dma_map_single(pt, dev);
-	if (ret)
+	if (ret != 0)
 		goto fail_dma;
 
 	return pt;
-- 
2.1.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux