drm/amdgpu: Remove unneeded variable 'ret' in navi10_ih.c
authorMa Feng <mafeng.ma@huawei.com>
Fri, 20 Dec 2019 09:36:08 +0000 (17:36 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 23 Dec 2019 19:59:09 +0000 (14:59 -0500)
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/navi10_ih.c:113:5-8: Unneeded variable: "ret". Return "0" on line 182

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ma Feng <mafeng.ma@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/navi10_ih.c

index 9af73567e716a62705c4f44b88f2b6a6d4f4f352..f737ce459c288757d850681f8ad6754dc2757abd 100644 (file)
@@ -110,7 +110,6 @@ static uint32_t navi10_ih_rb_cntl(struct amdgpu_ih_ring *ih, uint32_t ih_rb_cntl
 static int navi10_ih_irq_init(struct amdgpu_device *adev)
 {
        struct amdgpu_ih_ring *ih = &adev->irq.ih;
-       int ret = 0;
        u32 ih_rb_cntl, ih_doorbell_rtpr, ih_chicken;
        u32 tmp;
 
@@ -179,7 +178,7 @@ static int navi10_ih_irq_init(struct amdgpu_device *adev)
        /* enable interrupts */
        navi10_ih_enable_interrupts(adev);
 
-       return ret;
+       return 0;
 }
 
 /**