Skip to content

Commit 7718629

Browse files
luanshi0212rafaeljw
authored andcommitted
ACPI: AMBA: Fix resource name in /proc/iomem
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 <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 5e69282 commit 7718629

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/acpi/acpi_amba.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ static int amba_handler_attach(struct acpi_device *adev,
7676
case IORESOURCE_MEM:
7777
if (!address_found) {
7878
dev->res = *rentry->res;
79+
dev->res.name = dev_name(&dev->dev);
7980
address_found = true;
8081
}
8182
break;

0 commit comments

Comments
 (0)