From 6e7c9c61d9f05c633af9c3a672a6dd9143abc6bf Mon Sep 17 00:00:00 2001 From: Pascal Bauer Date: Wed, 4 Sep 2024 18:19:12 +0200 Subject: [PATCH] cleanup code Signed-off-by: Pascal Bauer --- common/lib/kernel/devices/platform_device.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/lib/kernel/devices/platform_device.cpp b/common/lib/kernel/devices/platform_device.cpp index 4c3e5258f..d8b128ad3 100644 --- a/common/lib/kernel/devices/platform_device.cpp +++ b/common/lib/kernel/devices/platform_device.cpp @@ -29,9 +29,7 @@ std::optional PlatformDevice::iommu_group() const { std::filesystem::path symlink = std::filesystem::path(this->m_path.u8string() + "/iommu_group"); - std::filesystem::path link; - link = std::filesystem::read_symlink(symlink); - + std::filesystem::path link = std::filesystem::read_symlink(symlink); std::string delimiter = "iommu_groups/"; int pos = link.u8string().find(delimiter); int iommu_group = std::stoi(link.u8string().substr(pos + delimiter.length()));