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

Markus Elfring Markus.Elfring at web.de
Mon Mar 31 09:15:46 PDT 2025


> devm_kasprintf() returns NULL if memory allocation fails. Currently,
…
                 call?                               failed?


> The corrected code adds error checking and optimizes resource release logic
…

See also once more:
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.14#n94


An other subsystem specification might be more desirable.
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


* May the array access be simplified another bit here?
* How do you think about to store a pointer to a corresponding data structure member
  in an additional local variable?


Regards,
Markus



More information about the linux-arm-kernel mailing list