summaryrefslogtreecommitdiff
path: root/drivers/of/platform.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-05-20 15:04:14 +0300
committerRob Herring <robh@kernel.org>2020-05-28 04:30:25 +0300
commit8a325dd06f2358ea0888e4ff1c9ca4bc23bd53f3 (patch)
tree43b15e49cc02ece48eb1f19eb864e8faba9d4a56 /drivers/of/platform.c
parent9dae090f4b0aad9e97b621f61ee75e24e2432ac7 (diff)
downloadlinux-8a325dd06f2358ea0888e4ff1c9ca4bc23bd53f3.tar.xz
of: Fix a refcounting bug in __of_attach_node_sysfs()
The problem in this code is that if kobject_add() fails, then it should call of_node_put(np) to drop the reference count. I've actually moved the of_node_get(np) later in the function to avoid needing to do clean up. Fixes: 5b2c2f5a0ea3 ("of: overlay: add missing of_node_get() in __of_attach_node_sysfs") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/platform.c')
0 files changed, 0 insertions, 0 deletions