1
0
Fork 0
remarkable-linux/drivers/edac
Johan Hovold 0c4439c444 EDAC: Fix memleak in module init error path
[ Upstream commit 4708aa85d5 ]

Make sure to use put_device() to free the initialised struct device so
that resources managed by driver core also gets released in the event of
a registration failure.

Signed-off-by: Johan Hovold <johan@kernel.org>
Cc: Denis Kirjanov <kirjanov@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-edac <linux-edac@vger.kernel.org>
Fixes: 2d56b109e3 ("EDAC: Handle error path in edac_mc_sysfs_init() properly")
Link: http://lkml.kernel.org/r/20180612124335.6420-1-johan@kernel.org
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-03 17:00:53 -07:00
..
Kconfig EDAC, ghes: Do not enable it by default 2017-04-27 14:15:38 +02:00
Makefile EDAC: Delete edac_stub.c 2017-04-10 17:14:48 +02:00
altera_edac.c EDAC, altera: Fix ARM64 build warning 2018-08-03 07:50:34 +02:00
altera_edac.h EDAC, altera: Rename device trigger to common name 2016-09-01 08:55:24 +02:00
amd64_edac.c x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping 2018-02-22 15:42:24 +01:00
amd64_edac.h EDAC, amd64: Bump driver version 2017-02-14 11:58:05 +01:00
amd64_edac_dbg.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
amd64_edac_inj.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
amd76x_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
amd8111_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
amd8111_edac.h
amd8131_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
amd8131_edac.h tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
cell_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
cpc925_edac.c EDAC, cpc925, ppc4xx: Convert to using %pOF instead of full_name 2017-07-19 07:42:41 +02:00
debugfs.c EDAC: Use edac_debugfs_remove_recursive() in edac_debugfs_exit() 2016-02-10 10:37:46 +01:00
e7xxx_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
e752x_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
edac_device.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
edac_device.h edac: move documentation from edac_device to edac_core.h 2016-12-15 08:54:51 -02:00
edac_device_sysfs.c edac: move EDAC device definitions to drivers/edac/edac_device.h 2016-12-15 08:54:51 -02:00
edac_mc.c EDAC: Add missing MEM_LRDDR4 entry in edac_mem_types[] 2018-08-24 13:08:55 +02:00
edac_mc.h EDAC: Add routine to check if MC devices list is empty 2017-01-28 14:36:47 +01:00
edac_mc_sysfs.c EDAC: Fix memleak in module init error path 2018-10-03 17:00:53 -07:00
edac_module.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
edac_module.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
edac_pci.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
edac_pci.h edac: move documentation from edac_pci*.c to edac_pci.h 2016-12-15 08:54:51 -02:00
edac_pci_sysfs.c edac: move documentation from edac_pci*.c to edac_pci.h 2016-12-15 08:54:51 -02:00
fsl_ddr_edac.c EDAC, fsl_ddr: Make locally used symbols static 2017-02-09 17:40:54 +01:00
fsl_ddr_edac.h EDAC, fsl_ddr: Add missing DDR DRAM types 2016-09-01 10:28:01 +02:00
ghes_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
highbank_l2_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
highbank_mc_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i7core_edac.c EDAC, i7core: Fix memleaks and use-after-free on probe and remove 2018-10-03 17:00:53 -07:00
i3000_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i3200_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i5000_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i5100_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i5400_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i7300_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i82443bxgx_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i82860_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i82875p_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
i82975x_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
ie31200_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
layerscape_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
mce_amd.c x86/mce/AMD, EDAC/mce_amd: Enumerate Reserved SMCA bank type 2018-04-19 08:56:20 +02:00
mce_amd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpc85xx_edac.c EDAC, mpc85xx: Add T2080 l2-cache support 2017-02-03 10:36:35 +01:00
mpc85xx_edac.h EDAC, fsl-ddr: Separate FSL DDR driver from MPC85xx 2016-09-01 10:28:00 +02:00
mv64x60_edac.c EDAC, mv64x60: Fix an error handling path 2018-04-12 12:32:19 +02:00
mv64x60_edac.h edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
octeon_edac-l2c.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
octeon_edac-lmc.c EDAC, octeon: Fix an uninitialized variable warning 2018-02-16 20:23:07 +01:00
octeon_edac-pc.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
octeon_edac-pci.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
pasemi_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
pnd2_edac.c EDAC, pnd2: Properly toggle hidden state for P2SB PCI device 2017-08-19 10:51:11 +02:00
pnd2_edac.h EDAC, pnd2_edac: Add new EDAC driver for Intel SoC platforms 2017-03-16 12:40:52 +01:00
ppc4xx_edac.c EDAC, cpc925, ppc4xx: Convert to using %pOF instead of full_name 2017-07-19 07:42:41 +02:00
ppc4xx_edac.h
r82600_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
sb_edac.c EDAC, sb_edac: Fix out of bound writes during DIMM configuration on KNL 2018-03-08 22:41:20 -08:00
skx_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
synopsys_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
thunderx_edac.c EDAC, thunderx: Fix error handling path in thunderx_lmc_probe() 2017-08-18 19:12:08 +02:00
tile_edac.c edac: rename edac_core.h to edac_mc.h 2016-12-15 08:54:51 -02:00
wq.c EDAC, wq: Remove deprecated create_singlethread_workqueue() 2016-08-15 07:21:29 +02:00
x38_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00
xgene_edac.c EDAC: Get rid of mci->mod_ver 2017-07-17 13:42:48 +02:00