[PATCH v3] drivers/misc: Add NULL check in aspeed_lpc_enable_snoop

Markus Elfring Markus.Elfring at web.de
Tue Apr 1 18:09:08 AEDT 2025


> 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?


…
> ---
> V2 -> V3: Simplify the arrary access and correct commit message.
…

* Would you like to avoid a typo here?

* 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

* Please choose a more appropriate subsystem specification.
  https://web.git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/drivers/soc/aspeed/aspeed-lpc-snoop.c?h=next-20250331

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

Regards,
Markus


More information about the Linux-aspeed mailing list