aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
diff options
context:
space:
mode:
authorQiushi Wu <[email protected]>2020-05-28 20:22:37 +0000
committerBorislav Petkov <[email protected]>2020-06-17 13:38:35 +0000
commit17ed808ad243192fb923e4e653c1338d3ba06207 (patch)
treecac6394e4118c2a5b2879200b76320793e8194b8 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
parentEDAC, {skx,i10nm}: Use CPU stepping macro to pass configurations (diff)
downloadkernel-17ed808ad243192fb923e4e653c1338d3ba06207.tar.gz
kernel-17ed808ad243192fb923e4e653c1338d3ba06207.zip
EDAC: Fix reference count leaks
When kobject_init_and_add() returns an error, it should be handled because kobject_init_and_add() takes a reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Therefore, replace calling kfree() and call kobject_put() and add a missing kobject_put() in the edac_device_register_sysfs_main_kobj() error path. [ bp: Massage and merge into a single patch. ] Fixes: b2ed215a3338 ("Kobject: change drivers/edac to use kobject_init_and_add") Signed-off-by: Qiushi Wu <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions