From: Zhang Xiaoxu Date: Mon, 16 Nov 2020 13:58:10 +0000 (-0500) Subject: EDAC/synopsys: Return the correct value in mc_probe() X-Git-Tag: Ubuntu-5.13.0-19.19~4426^2^4~1 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=61d35648c06cac042d88c6d0b8df8f8c8c72a4d4;p=mirror_ubuntu-jammy-kernel.git EDAC/synopsys: Return the correct value in mc_probe() Return the error value if the inject sysfs file creation fails, rather than returning 0, to signal to the upper layer that the ->probe function failed. [ bp: Massage. ] Signed-off-by: Zhang Xiaoxu Signed-off-by: Borislav Petkov Reviewed-by: Michal Simek Link: https://lkml.kernel.org/r/20201116135810.3130845-1-zhangxiaoxu5@huawei.com --- diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 12211dc040e8..7e7146b22c16 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -1344,7 +1344,8 @@ static int mc_probe(struct platform_device *pdev) #ifdef CONFIG_EDAC_DEBUG if (priv->p_data->quirks & DDR_ECC_DATA_POISON_SUPPORT) { - if (edac_create_sysfs_attributes(mci)) { + rc = edac_create_sysfs_attributes(mci); + if (rc) { edac_printk(KERN_ERR, EDAC_MC, "Failed to create sysfs entries\n"); goto free_edac_mc;