From: Brian Masney <bmasney@redhat.com>
To: Min zhang <zhangmin2026@yeah.net>
Cc: Wei Xu <xuwei5@hisilicon.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: hisilicon: reset: Use devm_kzalloc to initialize hisi_reset_controller
Date: Mon, 11 May 2026 11:09:32 -0400 [thread overview]
Message-ID: <agHxLO-sl3pCYVY6@redhat.com> (raw)
In-Reply-To: <20260511053216.538035-1-zhangmin2026@yeah.net>
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@yeah.net>
Fixes: 97b7129cd2afb ("reset: hisilicon: change the definition of hisi_reset_init")
Reviewed-by: Brian Masney <bmasney@redhat.com>
next prev parent reply other threads:[~2026-05-11 15:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 5:32 [PATCH] clk: hisilicon: reset: Use devm_kzalloc to initialize hisi_reset_controller Min zhang
2026-05-11 15:09 ` Brian Masney [this message]
2026-05-11 17:04 ` [PATCH v2] " Min zhang
2026-05-11 17:50 ` Brian Masney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=agHxLO-sl3pCYVY6@redhat.com \
--to=bmasney@redhat.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=sboyd@kernel.org \
--cc=xuwei5@hisilicon.com \
--cc=zhangmin2026@yeah.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox