From: Yazen Ghannam Date: Tue, 24 Jan 2017 22:32:24 +0000 (-0600) Subject: EDAC, amd64: Free unused memory when init_one_instance() fails X-Git-Tag: v4.11-rc1~179^2~11 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2b9b2c465928260f40e2f570c953881bff291bef;p=karo-tx-linux.git EDAC, amd64: Free unused memory when init_one_instance() fails Jump to memory freeing routines when init_one_instance() fails. Signed-off-by: Yazen Ghannam Cc: linux-edac Link: http://lkml.kernel.org/r/1485297149-13733-3-git-send-email-Yazen.Ghannam@amd.com Signed-off-by: Borislav Petkov --- diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 4a480da713b9..5fa6e5ea8be3 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -3363,6 +3363,8 @@ static int probe_one_instance(unsigned int nid) if (boot_cpu_data.x86 < 0x17) restore_ecc_error_reporting(s, nid, F3); + + goto err_enable; } return ret;