Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • drivers
  • perf
  • thunderx2_pmu.c
Find file BlameHistoryPermalink
  • Mark Salter's avatar
    drivers/perf: thunderx2_pmu: Fix memory resource error handling · 688494a4
    Mark Salter authored Sep 15, 2020
    In tx2_uncore_pmu_init_dev(), a call to acpi_dev_get_resources() is used
    to create a list _CRS resources which is searched for the device base
    address. There is an error check following this:
    
       if (!rentry->res)
               return NULL
    
    In no case, will rentry->res be NULL, so the test is useless. Even
    if the test worked, it comes before the resource list memory is
    freed. None of this really matters as long as the ACPI table has
    the memory resource. Let's clean it up so that it makes sense and
    will give a meaningful error should firmware leave out the memory
    resource.
    
    Fixes: 69c32972
    
     ("drivers/perf: Add Cavium ThunderX2 SoC UNCORE PMU driver")
    Signed-off-by: default avatarMark Salter <msalter@redhat.com>
    Link: https://lore.kernel.org/r/20200915204110.326138-2-msalter@redhat.com
    
    
    Signed-off-by: default avatarWill Deacon <will@kernel.org>
    688494a4
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7