public inbox for linux-edac@vger.kernel.org
 help / color / mirror / Atom feed
From: "Luck, Tony" <tony.luck@intel.com>
To: Ma Ke <make24@iscas.ac.cn>
Cc: <jbaron@akamai.com>, <bp@alien8.de>, <qiuxu.zhuo@intel.com>,
	<linux-edac@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<akpm@linux-foundation.org>
Subject: Re: [PATCH v3] EDAC/ie31200: Fix error handling in ie31200_register_mci
Date: Mon, 10 Nov 2025 17:15:20 -0800	[thread overview]
Message-ID: <aRKOKF-UTpdmtxnq@agluck-desk3> (raw)
In-Reply-To: <20251106084735.35017-1-make24@iscas.ac.cn>

On Thu, Nov 06, 2025 at 04:47:35PM +0800, Ma Ke wrote:
> ie31200_register_mci() calls device_initialize() for priv->dev
> unconditionally. However, in the error path, put_device() is not
> called, leading to an imbalance. Similarly, in the unload path,
> put_device() is missing.
> 
> Although edac_mc_free() eventually frees the memory, it does not
> release the device initialized by device_initialize(). For code
> readability and proper pairing of device_initialize()/put_device(),
> add put_device() calls in both error and unload paths.
> 
> Found by code review.
> 
> Signed-off-by: Ma Ke <make24@iscas.ac.cn>

Applied v3 version.

Thanks

-Tony

      parent reply	other threads:[~2025-11-11  1:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06  8:47 [PATCH v3] EDAC/ie31200: Fix error handling in ie31200_register_mci Ma Ke
2025-11-06 11:34 ` Borislav Petkov
2025-11-06 13:07 ` Zhuo, Qiuxu
2025-11-11  1:15 ` Luck, Tony [this message]

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=aRKOKF-UTpdmtxnq@agluck-desk3 \
    --to=tony.luck@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=jbaron@akamai.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=make24@iscas.ac.cn \
    --cc=qiuxu.zhuo@intel.com \
    /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