mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Gerlach <matthew.gerlach@altera.com>
To: dinguyen@kernel.org, bp@alien8.de, tony.luck@intel.com,
	james.morse@arm.com, mchehab@kernel.org, rric@kernel.org,
	tthayer@opensource.altera.com, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Niravkumar L Rabara <niravkumar.l.rabara@altera.com>,
	stable@kernel.org, Matthew Gerlach <matthew.gerlach@altera.com>
Subject: [PATCH v2 1/2] EDAC/altera: fix cut and paste error
Date: Mon, 21 Apr 2025 09:14:46 -0700	[thread overview]
Message-ID: <20250421161447.41886-2-matthew.gerlach@altera.com> (raw)
In-Reply-To: <20250421161447.41886-1-matthew.gerlach@altera.com>

From: Niravkumar L Rabara <niravkumar.l.rabara@altera.com>

Test correct structure member, ecc_cecnt_offset, before using it.

Fixes: 73bcc942f4271 ("EDAC, altera: Add Arria10 EDAC support")
Cc: stable@kernel.org
Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@altera.com>
Signed-off-by: Matthew Gerlach <matthew.gerlach@altera.com>
---
v2:
 - Improve commit message.
 - Add Fixes: and Cc: tags.
---
 drivers/edac/altera_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index 3e971f902363..88d9d2f458ee 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -99,7 +99,7 @@ static irqreturn_t altr_sdram_mc_err_handler(int irq, void *dev_id)
 	if (status & priv->ecc_stat_ce_mask) {
 		regmap_read(drvdata->mc_vbase, priv->ecc_saddr_offset,
 			    &err_addr);
-		if (priv->ecc_uecnt_offset)
+		if (priv->ecc_cecnt_offset)
 			regmap_read(drvdata->mc_vbase,  priv->ecc_cecnt_offset,
 				    &err_count);
 		edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, err_count,
-- 
2.35.3


  reply	other threads:[~2025-04-21 16:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-21 16:14 [PATCH v2 0/2] EDAC/altera: two bug fixes Matthew Gerlach
2025-04-21 16:14 ` Matthew Gerlach [this message]
2025-04-24 22:53   ` [PATCH v2 1/2] EDAC/altera: fix cut and paste error Dinh Nguyen
2025-04-25  0:32     ` Gerlach, Matthew
2025-04-25  0:40       ` Luck, Tony
2025-04-21 16:14 ` [PATCH v2 2/2] EDAC/altera: Set DDR and SDMMC interrupt mask before registration Matthew Gerlach
2025-04-24 22:58   ` Dinh Nguyen

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=20250421161447.41886-2-matthew.gerlach@altera.com \
    --to=matthew.gerlach@altera.com \
    --cc=bp@alien8.de \
    --cc=dinguyen@kernel.org \
    --cc=james.morse@arm.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=niravkumar.l.rabara@altera.com \
    --cc=rric@kernel.org \
    --cc=stable@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=tthayer@opensource.altera.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

all inboxes | Powered by JetHome®