Skip to content
Commit 1bcad8e5 authored by Mario Limonciello's avatar Mario Limonciello Committed by Hans de Goede
Browse files

platform/x86: think-lmi: Fix issues with duplicate attributes

On an AMD based Lenovo T14, I find that the module doesn't work at
all, and instead has a traceback with messages like:

```
sysfs: cannot create duplicate filename '/devices/virtual/firmware-attributes/thinklmi/attributes/Reserved'
```

Duplicate and reserved values showing up appear to be a firmware bug,
but they shouldn't make the driver explode.  So catch them and skip
them.

Fixes: a40cd7ef

 ("platform/x86: think-lmi: Add WMI interface support on Lenovo platforms")
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20210622200755.12379-2-mario.limonciello@amd.com


[hdegoede@redhat.com: Add missing kfree(tlmi_priv.setting[i])]
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 71d69e82
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment