aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/arch
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2/arch')
-rw-r--r--hardinfo2/arch/linux/common/resources.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/hardinfo2/arch/linux/common/resources.h b/hardinfo2/arch/linux/common/resources.h
index e669b0ec..6ce5688d 100644
--- a/hardinfo2/arch/linux/common/resources.h
+++ b/hardinfo2/arch/linux/common/resources.h
@@ -37,12 +37,14 @@ static gchar *_resource_obtain_name(gchar *name)
if (g_regex_match(_regex_pci, name, 0, NULL)) {
temp = module_call_method_param("devices::getPCIDeviceDescription", name);
- return temp ? temp : g_strdup(name);
- }
-
- if (g_regex_match(_regex_module, name, 0, NULL)) {
+ if (temp) {
+ return temp;
+ }
+ } else if (g_regex_match(_regex_module, name, 0, NULL)) {
temp = module_call_method_param("computer::getKernelModuleDescription", name);
- return temp ? temp : g_strdup(name);
+ if (temp) {
+ return temp;
+ }
}
return g_strdup(name);
@@ -120,5 +122,4 @@ void scan_device_resources(gboolean reload)
gchar *callback_device_resources(void)
{
return _resources;
-}
-
+} \ No newline at end of file