summaryrefslogtreecommitdiff
path: root/drivers/bus/ti-sysc.c
diff options
context:
space:
mode:
authorMiaoqian Lin <linmq006@gmail.com>2022-05-11 11:14:19 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-19 18:56:56 +0200
commit660ba678f9998aca6db74f2dd912fa5124f0fa31 (patch)
treedde53684885eccf41dd6c08c2390cac15756937d /drivers/bus/ti-sysc.c
parent077f5d900f62a817b155e614e7eb79220b1405de (diff)
firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle
kobject_init_and_add() takes reference even when it fails. According to the doc of kobject_init_and_add() If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Fix this issue by calling kobject_put(). Fixes: 948af1f0bbc8 ("firmware: Basic dmi-sysfs support") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220511071421.9769-1-linmq006@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/bus/ti-sysc.c')
0 files changed, 0 insertions, 0 deletions