Re: [PATCH] clk: hisilicon: reset: Use devm_kzalloc to initialize hisi_reset_controller
From: Brian Masney
Date: Mon May 11 2026 - 11:32:42 EST
On Mon, May 11, 2026 at 01:32:14PM +0800, Min zhang wrote:
> Using devm_kmalloc() does not zero-initialize the allocated structure.
> Uninitialized members in struct hisi_reset_controller may contain garbage
> data, which can cause reset_controller_register() to fail unexpectedly.
>
> Replace devm_kmalloc() with devm_kzalloc() to ensure all structure fields
> are properly zero-initialized.
>
> Fixes: reset controller registration failure due to invalid dirty data
This is not a valid fixes tag. Please drop.
>
> Signed-off-by: Min zhang <zhangmin2026@xxxxxxxx>
Fixes: 97b7129cd2afb ("reset: hisilicon: change the definition of hisi_reset_init")
Reviewed-by: Brian Masney <bmasney@xxxxxxxxxx>