Skip to content

Commit

Permalink
edac: xilinx: Fix the error path
Browse files Browse the repository at this point in the history
Currently the mc is not deleted in the error path.
Fix the same.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
  • Loading branch information
Shubhrajyoti Datta authored and Michal Simek committed Apr 23, 2021
1 parent 9312711 commit d2aa9a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/edac/xilinx_ddrmc_edac.c
Expand Up @@ -1140,14 +1140,16 @@ static int xddr_mc_probe(struct platform_device *pdev)
if (edac_create_sysfs_attributes(mci)) {
edac_printk(KERN_ERR, EDAC_MC,
"Failed to create sysfs entries\n");
goto free_edac_mc;
goto del_edac_mc;
}

xddr_setup_address_map(priv);
#endif

return rc;

del_edac_mc:
edac_mc_del_mc(&pdev->dev);
free_edac_mc:
edac_mc_free(mci);

Expand Down

0 comments on commit d2aa9a9

Please sign in to comment.