diff options
author | Mark Salter <msalter@redhat.com> | 2020-09-15 16:41:10 -0400 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-09-18 14:34:51 +0100 |
commit | 688494a407d1419a6b158c644b262c61cde39f48 (patch) | |
tree | af5dbdb86c20c2dacbf1171c702931cb3b6195e3 /samples | |
parent | a76b8236edcf5b785d044b930f9e14ad02b4a484 (diff) |
drivers/perf: thunderx2_pmu: Fix memory resource error handling
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: 69c32972d593 ("drivers/perf: Add Cavium ThunderX2 SoC UNCORE PMU driver")
Signed-off-by: Mark Salter <msalter@redhat.com>
Link: https://lore.kernel.org/r/20200915204110.326138-2-msalter@redhat.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions