Re: [PATCH v2] HID: uclogic: Add NULL check in uclogic_input_configured

From: Markus Elfring
Date: Tue Apr 01 2025 - 04:21:27 EST


> devm_kasprintf() return NULL if memory allocation fails. Currently,

call? failed?


> Add NULL check after devm_kasprintf() to prevent this issue.

Do you propose to improve this function implementation a bit more?



> ---
> V1 -> V2:
> Simplify the handing of the condition "suffix" with if/else suggested by …

* I imagine that there is a need to offer such adjustments
in separate update steps.
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.14#n81

* Can another tag become more helpful?
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.14#n598


> The current implementation (directly returning -ENOMEM) is reasonable because:


How much will such information influence the refinement of the change description?


How do you think about to append parentheses to a function name
also in the summary phrase?

Regards,
Markus