diff options
author | Robert Richter <rrichter@marvell.com> | 2020-02-12 15:03:39 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2020-02-13 15:29:41 +0300 |
commit | 4d59588c09f2a2daedad2a544d4d1b602ab3a8af (patch) | |
tree | e1b77de7c8b081efe98d3798714ceb643b4b7ad9 /drivers/edac/octeon_edac-l2c.c | |
parent | 216aa145aaf379a50b17afc812db71d893bd6683 (diff) | |
download | linux-4d59588c09f2a2daedad2a544d4d1b602ab3a8af.tar.xz |
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 <rrichter@marvell.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: John Garry <john.garry@huawei.com>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20200212120340.4764-4-rrichter@marvell.com
Diffstat (limited to 'drivers/edac/octeon_edac-l2c.c')
0 files changed, 0 insertions, 0 deletions