Skip to content

Commit

Permalink
ACPI: AMBA: Fix resource name in /proc/iomem
Browse files Browse the repository at this point in the history
[ Upstream commit 7718629 ]

In function amba_handler_attach(), dev->res.name is initialized by
amba_device_alloc. But when address_found is false, dev->res.name is
assigned to null value, which leads to wrong resource name display in
/proc/iomem, "<BAD>" is seen for those resources.

Signed-off-by: Liguang Zhang <zhangliguang@linux.alibaba.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
luanshi0212 authored and gregkh committed Jul 20, 2021
1 parent d19dbb8 commit 0d1b0bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/acpi_amba.c
Expand Up @@ -76,6 +76,7 @@ static int amba_handler_attach(struct acpi_device *adev,
case IORESOURCE_MEM:
if (!address_found) {
dev->res = *rentry->res;
dev->res.name = dev_name(&dev->dev);
address_found = true;
}
break;
Expand Down

0 comments on commit 0d1b0bb

Please sign in to comment.