Re: [PATCH] usb: typec: qcom-pmic-typec: use kcalloc() instead of kzalloc()

From: Dmitry Baryshkov
Date: Tue Aug 19 2025 - 07:48:06 EST


On Tue, Aug 19, 2025 at 05:01:24PM +0800, Qianfeng Rong wrote:
> Replace devm_kzalloc() with devm_kcalloc() in qcom_pmic_typec_pdphy_probe()
> and qcom_pmic_typec_port_probe() for safer memory allocation with built-in
> overflow protection.
>
> Signed-off-by: Qianfeng Rong <rongqianfeng@xxxxxxxx>
> ---
> drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 2 +-
> drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>


--
With best wishes
Dmitry