Skip to content

Commit 10d97b7

Browse files
committed
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()
2 parents 35bdc19 + 51520e0 commit 10d97b7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/edac/edac_mc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,13 +369,13 @@ struct mem_ctl_info *edac_mc_alloc(unsigned int mc_num,
369369
if (!mci->layers)
370370
goto error;
371371

372+
mci->dev.release = mci_release;
373+
device_initialize(&mci->dev);
374+
372375
mci->pvt_info = kzalloc(sz_pvt, GFP_KERNEL);
373376
if (!mci->pvt_info)
374377
goto error;
375378

376-
mci->dev.release = mci_release;
377-
device_initialize(&mci->dev);
378-
379379
/* setup index and various internal pointers */
380380
mci->mc_idx = mc_num;
381381
mci->tot_dimms = tot_dimms;

0 commit comments

Comments
 (0)