Skip to contentSkip to conversation

gpu: drm: amd: powerplay: Remove logically dead code

PATCH Applied Hariprasad Kelam 2 participants 2 messages Aug 5, 2019 – Aug 6, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpu: drm: amd: powerplay: Remove logically dead code

Result of pointer airthmentic is never null

fix coverity defect:1451876

---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +0 -2
index ee739c0..a3acd77 100644
@@ -736,8 +736,6 @@ static int smu_v11_0_write_watermarks_table(struct smu_context *smu)
 	struct smu_table *table = NULL;
 
 	table = &smu_table->tables[SMU_TABLE_WATERMARKS];
-	if (!table)
-		return -EINVAL;
 
 	if (!table->cpu_addr)
 		return -EINVAL;
Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 6 lines · Hariprasad Kelam

Result of pointer airthmentic is never null

fix coverity defect:1451876

Applied. thanks!

Alex

Quoted 24 lines
---
 drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smu_v11_0.c +0 -3
index ee739c0..a3acd77 100644
@@ -736,8 +736,6 @@ static int smu_v11_0_write_watermarks_table(struct smu_context *smu)
        struct smu_table *table = NULL;
 
        table = &smu_table->tables[SMU_TABLE_WATERMARKS];
-       if (!table)
-               return -EINVAL;
 
        if (!table->cpu_addr)
                return -EINVAL;
--

2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx