summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-04-12 11:56:07 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-04-12 11:56:07 -0700
commit10d97b74e2eef787d823f9bc05cb044b47d25c41 (patch)
treec7b0507c7975e01dcdb3bde9cdf22073b24bcf7e
parent35bdc192d829164a6e47184d06401918fe3d7f1f (diff)
parent51520e03e70d6c73e33ee7cbe0319767d05764fe (diff)
downloadlwn-10d97b74e2eef787d823f9bc05cb044b47d25c41.tar.gz
lwn-10d97b74e2eef787d823f9bc05cb044b47d25c41.zip
Merge tag 'edac_urgent_for_7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras
Pull EDAC fix from Borislav Petkov: - Fix the error path ordering when the driver-private descriptor allocation fails * tag 'edac_urgent_for_7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/mc: Fix error path ordering in edac_mc_alloc()
-rw-r--r--drivers/edac/edac_mc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 29e9828422bb..11d66333d93b 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -369,13 +369,13 @@ struct mem_ctl_info *edac_mc_alloc(unsigned int mc_num,
if (!mci->layers)
goto error;
+ mci->dev.release = mci_release;
+ device_initialize(&mci->dev);
+
mci->pvt_info = kzalloc(sz_pvt, GFP_KERNEL);
if (!mci->pvt_info)
goto error;
- mci->dev.release = mci_release;
- device_initialize(&mci->dev);
-
/* setup index and various internal pointers */
mci->mc_idx = mc_num;
mci->tot_dimms = tot_dimms;