[PATCH v2] driver: tx2: Add NULL check in tx2_uncore_pmu_register

Markus Elfring Markus.Elfring at web.de
Mon Mar 31 07:07:04 PDT 2025


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

                   call returns?                    failed?


> tx2_uncore_pmu_register() does not check for this case, leading to a
> possible NULL pointer dereference.
…

You may omit the word “possible” in such a change description.


Is any automated source code analysis involved here?
https://cwe.mitre.org/data/definitions/252.html

Regards,
Markus



More information about the linux-arm-kernel mailing list