The acpi_dev_get_first_match_name() is missing put_device() call and thus keeping reference counting unbalanced. In order to fix the issue introduce a new helper to convert existing users one-by-one to a better API.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -669,6 +669,12 @@ static inline bool acpi_dev_present(const char *hid, const char *uid, s64 hrv) · 668 unmodified lines | ||
| 669 | 669 | return false; |
| 670 | 670 | } |
| 671 | 671 | |
| 672 | +static inline struct acpi_device * | |
| 673 | +acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv) | |
| 674 | +{ | |
| 675 | + return NULL; | |
| 676 | +} | |
| 677 | + | |
| 672 | 678 | static inline const char * |
| 673 | 679 | acpi_dev_get_first_match_name(const char *hid, const char *uid, s64 hrv) |
| 674 | 680 | { |