Re: [PATCH v2] clk: hisilicon: reset: Use devm_kzalloc to initialize hisi_reset_controller

From: Brian Masney

Date: Mon May 11 2026 - 14:00:49 EST


Hi Min,

On Tue, May 12, 2026 at 01:04:14AM +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: 97b7129cd2afb ("reset: hisilicon: change the definition of hisi_reset_init")
>
> Reviewed-by: Brian Masney <bmasney@xxxxxxxxxx>
> Signed-off-by: Min zhang <zhangmin2026@xxxxxxxx>

There's no newline between the Fixes and the other tags. Take a look at
'git log' and look at the other commits.

Sorry for the trivial ask, but it's important to keep things like this
consistent across the kernel.

Brian