projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3d3721
)
dpaa2-ptp: Fix refcount leak in dpaa2_ptp_probe
author
Miaoqian Lin
<linmq006@gmail.com>
Mon, 4 Apr 2022 12:53:36 +0000
(12:53 +0000)
committer
Paolo Abeni
<pabeni@redhat.com>
Tue, 5 Apr 2022 10:38:11 +0000
(12:38 +0200)
This node pointer is returned by of_find_compatible_node() with
refcount incremented. Calling of_node_put() to aovid the refcount leak.
Fixes:
d346c9e86d86
("dpaa2-ptp: reuse ptp_qoriq driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link:
https://lore.kernel.org/r/20220404125336.13427-1-linmq006@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
index
5f5f8c5
..
c8cb541
100644
(file)
--- a/
drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
+++ b/
drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
@@
-167,7
+167,7
@@
static int dpaa2_ptp_probe(struct fsl_mc_device *mc_dev)
base = of_iomap(node, 0);
if (!base) {
err = -ENOMEM;
- goto err_
close
;
+ goto err_
put
;
}
err = fsl_mc_allocate_irqs(mc_dev);
@@
-210,6
+210,8
@@
err_free_mc_irq:
fsl_mc_free_irqs(mc_dev);
err_unmap:
iounmap(base);
+err_put:
+ of_node_put(node);
err_close:
dprtc_close(mc_dev->mc_io, 0, mc_dev->mc_handle);
err_free_mcp: