Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3a68bfc authored by Liguang Zhang's avatar Liguang Zhang Committed by Greg Kroah-Hartman
Browse files

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: default avatarLiguang Zhang <zhangliguang@linux.alibaba.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7ccf66b8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,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;