ACPI: sysfs: Clean up create_pnp_modalias() and create_of_modalias()

'modalias' is only written with snprintf() and it is already guaranteed
to be nul-terminated, so remove the unneeded (but harmless) writes of a
trailing '\0' to it.

Also snprintf() never returns negative values, so remove redundant (but
harmless) checks for it.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
[ rjw: Merge two patches into one, combine changelogs, add subject ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Christophe JAILLET 2023-10-23 21:33:17 +02:00 • committed by Rafael J. Wysocki
commit bc8f7abe97