lkml.org 
[lkml]   [2014]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 1/1] GPU-DRM-MSM-Adreno: Deletion of unnecessary checks before the function call "release_firmware"
    From: Markus Elfring <elfring@users.sourceforge.net>
    Date: Tue, 25 Nov 2014 13:44:20 +0100

    The release_firmware() function tests whether its argument is NULL
    and then returns immediately. Thus the test around the call is not needed.

    This issue was detected by using the Coccinelle software.

    Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
    ---
    drivers/gpu/drm/msm/adreno/adreno_gpu.c | 6 ++----
    1 file changed, 2 insertions(+), 4 deletions(-)

    diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
    index 655ce5b..757052c 100644
    --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
    +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
    @@ -404,9 +404,7 @@ void adreno_gpu_cleanup(struct adreno_gpu *gpu)
    msm_gem_put_iova(gpu->memptrs_bo, gpu->base.id);
    drm_gem_object_unreference(gpu->memptrs_bo);
    }
    - if (gpu->pm4)
    - release_firmware(gpu->pm4);
    - if (gpu->pfp)
    - release_firmware(gpu->pfp);
    + release_firmware(gpu->pm4);
    + release_firmware(gpu->pfp);
    msm_gpu_cleanup(&gpu->base);
    }
    --
    2.1.3


    \
     
     \ /
      Last update: 2014-11-25 14:21    [W:4.039 / U:0.904 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site