]> git.baikalelectronics.ru Git - kernel.git/commit
ipmi:ipmb: Fix refcount leak in ipmi_ipmb_probe
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 12 May 2022 04:44:45 +0000 (08:44 +0400)
committerCorey Minyard <cminyard@mvista.com>
Thu, 12 May 2022 15:00:04 +0000 (10:00 -0500)
commit3f1c4166aa1caac2c0cbfcdf41284f7506e53834
treef413bb97de9823e8585e1b182e1a865a6a2361c4
parent917202a04ac9f21752e117bcc980b9c402a53869
ipmi:ipmb: Fix refcount leak in ipmi_ipmb_probe

of_parse_phandle() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.

Fixes: 2608fbcf86e7 ("ipmi:ipmb: Add the ability to have a separate slave and master device")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Message-Id: <20220512044445.3102-1-linmq006@gmail.com>
Cc: stable@vger.kernel.org # v5.17+
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_ipmb.c