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:17:52 +0000 (16:17 +0200)
commitc41acf8a8a401dc5992d46ef3923877454faaa9f
tree5a2d311b2d08076b33a90c0a79f4ae3c4b7f7193
parent30fabced7facc3fda006b12237c3c81b2fb2e45b
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