@@ -344,17 +345,24 @@ static int fw_get_filesystem_firmware(struct device *device,
else
break;
}
- __putname(path);
if (!rc) {
- dev_dbg(device, "firmware: direct-loading firmware %s\n",
- buf->fw_id);
+ // fallback on symlink in case lookup goes wrong
+ const char *resolved_sym = path;
+
+ struct path dp;
+ if (!kern_path(path, LOOKUP_FOLLOW, &dp))
+ resolved_sym = dp.dentry->d_name.name;
+
+ dev_info(device, "firmware: direct-loading firmware %s\n",
+ resolved_sym);
mutex_lock(&fw_lock);
set_bit(FW_STATUS_DONE, &buf->status);
complete_all(&buf->completion);
mutex_unlock(&fw_lock);
}
+ __putname(path);
return rc;
}