• Julia Lawall's avatar
    ASoC: keep pointer to resource so it can be freed · 226d0f22
    Julia Lawall authored
    Add a new variable for storing resources accessed subsequent to the one
    accessed using request_mem_region, so the one accessed using
    request_mem_region can be released if needed.
    
    The resource variable names are also changed to be more descriptive.
    
    This code is also missing some calls to iounmap.
    
    The semantic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)
    
    // <smpl>
    @r@
    expression E, E1;
    identifier f;
    statement S1,S2,S3;
    @@
    
    if (E == NULL)
    {
      ... when != if (E == NULL || ...) S1 else S2
          when != E = E1
    *E->f
      ... when any
      return ...;
    }
    else S3
    // </smpl>
    Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
    Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
    226d0f22
mxs-saif.c 19.3 KB