aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/lpddr/lpddr_cmds.c
diff options
context:
space:
mode:
authorRobert Richter <[email protected]>2020-02-12 12:03:39 +0000
committerBorislav Petkov <[email protected]>2020-02-13 12:29:41 +0000
commit4d59588c09f2a2daedad2a544d4d1b602ab3a8af (patch)
treee1b77de7c8b081efe98d3798714ceb643b4b7ad9 /drivers/mtd/lpddr/lpddr_cmds.c
parentEDAC/mc: Fix use-after-free and memleaks during device removal (diff)
downloadkernel-4d59588c09f2a2daedad2a544d4d1b602ab3a8af.tar.gz
kernel-4d59588c09f2a2daedad2a544d4d1b602ab3a8af.zip
EDAC/sysfs: Remove csrow objects on errors
All created csrow objects must be removed in the error path of edac_create_csrow_objects(). The objects have been added as devices. They need to be removed by doing a device_del() *and* put_device() call to also free their memory. The missing put_device() leaves a memory leak. Use device_unregister() instead of device_del() which properly unregisters the device doing both. Fixes: 7adc05d2dc3a ("EDAC/sysfs: Drop device references properly") Signed-off-by: Robert Richter <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Tested-by: John Garry <[email protected]> Cc: <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/mtd/lpddr/lpddr_cmds.c')
0 files changed, 0 insertions, 0 deletions