]> git.baikalelectronics.ru Git - kernel.git/commit
gianfar: ethtool: Fix refcount leak in gfar_get_ts_info
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 10 Mar 2022 01:53:13 +0000 (01:53 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Mar 2022 20:20:54 +0000 (12:20 -0800)
commite69fa7393baac46ebe486bf0cabb3cf27f5e3d81
tree6d4869d50fb4092b713945126bd726fa26b10a7f
parent420c4a4490966b7012285c870ebe9e1ac13b83d3
gianfar: ethtool: Fix refcount leak in gfar_get_ts_info

The of_find_compatible_node() function returns a node pointer with
refcount incremented, We should use of_node_put() on it when done
Add the missing of_node_put() to release the refcount.

Fixes: e8c33fba7e22 ("net: ethernet: gianfar_ethtool: get phc index through drvdata")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Link: https://lore.kernel.org/r/20220310015313.14938-1-linmq006@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/gianfar_ethtool.c