Re: [PATCH] extcon: realtek: fix NULL deref check in extcon_rtk_type_c_probe
From: Markus Elfring
Date: Mon Nov 18 2024 - 07:00:53 EST
> In extcon_rtk_type_c_probe() devm_kzalloc() may return NULL but this
> returned value is not checked.
Another wording suggestion:
A devm_kzalloc() call can return a null pointer on failure.
But such a return value was not checked in this function implementation.
Thus add a corresponding check so that a null pointer dereference
will be avoided.
Would a summary phrase like “Prevent null pointer dereference in extcon_rtk_type_c_probe()”
be a bit nicer?
Regards,
Markus