Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ipipe
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • xenomai
  • ipipe
  • Repository

Switch branch/tag
  • ipipe
  • drivers
  • net
  • ethernet
  • cavium
  • thunder
  • thunder_bgx.c
Find file BlameHistoryPermalink
  • Julia Lawall's avatar
    net: thunderx: add missing of_node_put · 8c387ebb
    Julia Lawall authored Oct 25, 2015
    for_each_child_of_node performs an of_node_get on each iteration, so
    a break out of the loop requires an of_node_put.
    
    A simplified version of the semantic patch that fixes this problem is as
    follows (http://coccinelle.lip6.fr
    
    ):
    
    // <smpl>
    @@
    local idexpression r.n;
    expression r,e;
    @@
    
     for_each_child_of_node(r,n) {
       ...
    (
       of_node_put(n);
    |
       e = n
    |
    +  of_node_put(n);
    ?  break;
    )
       ...
     }
    ... when != n
    // </smpl>
    Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8c387ebb

Replace thunder_bgx.c

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.

Imprint & Privacy Policy