lkml.org 
[lkml]   [2022]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [net-next PATCH 2/2] net: ethernet: stmmac: reset force speed bit for ipq806x
On Thu,  9 Jun 2022 02:28:31 +0200 Christian 'Ansuel' Marangi wrote:
> + dn = of_get_child_by_name(pdev->dev.of_node, "fixed-link");
> + ret = of_property_read_u32(dn, "speed", &link_speed);
> + if (ret) {
> + dev_err(dev, "found fixed-link node with no speed");
> + return ret;

Doesn't this return potentially leak the reference on dn?
You move the of_node_put() right before the if (ret) {

> + }
> +
> + of_node_put(dn);

\
 
 \ /
  Last update: 2022-06-14 07:51    [W:0.067 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site