ACPI / amba: Fix resource name in /proc/iomem
PATCH 1/1 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]>
--- drivers/acpi/acpi_amba.c | 1 + 1 file changed, 1 insertion(+)
drivers/acpi/acpi_amba.c +1 -0
@@ -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 ;
Signature · 1 line
2.19.1.6.gb485710b
Quoted 16 lines · Liguang Zhang
In function
amba_handler_attach(),dev->res.nameis initialized byamba_device_alloc. But whenaddress_foundis false,dev->res.nameis 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]>--- drivers/acpi/acpi_amba.c | 1 + 1 file changed, 1 insertion(+)drivers/acpi/acpi_amba.c +0
-0
drivers/acpi/acpi_amba.c static int amba_handler_attach(struct acpi_device *adev,
Quoted 8 lines
drivers/acpi/acpi_amba.c +1
-1@@ -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 ; --
Applied as 5.14-rc1 material, thanks!