ACPI: AMBA: Fix resource name in /proc/iomem
authorLiguang Zhang <zhangliguang@linux.alibaba.com>
Tue, 29 Jun 2021 11:27:48 +0000 (19:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:05:49 +0000 (16:05 +0200)
commit4f2b140658cd97e1f17e9e8a7ffbe2675184dfe6
treed77979fe2c6c84cd481b1b57537e9001c333d7d7
parent9dcc9ad3434869d7413a0220821181b3de1cd396
ACPI: AMBA: Fix resource name in /proc/iomem

[ Upstream commit 7718629432676b5ebd9a32940782fe297a0abf8d ]

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>
drivers/acpi/acpi_amba.c