Author: Julia Lawall <julia@diku.dk> The first change is to add an of_node_put, since codec_np has previously been allocated. The rest of the patch reorganizes the error handling code so the only code executed is that which is needed. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ …
Catégorie : Linux
Aug 20 2011
sound/soc/fsl/p1022_ds.c: add missing of_node_put
Author: Julia Lawall <julia@diku.dk> dma_channel_np has been accessed at this point, so decrease its reference count before leaving the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; expression E1!=0,E2,E3,E4; statement S; iterator I; @@ ( if (…) { … when != of_node_put(x) when …
Aug 20 2011
ALSA: sound/aoa/fabrics/layout.c: remove unneeded kfree
Author: Julia Lawall <julia@diku.dk> The label outnodev is only used when kzalloc has not yet taken place or has failed, so there is no need for the call for kfree under this label. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; expression E1!=0,E2,E3,E4; statement …
Aug 20 2011
sound/soc/ep93xx/ep93xx-i2s.c: add missing kfree
Author: Julia Lawall <julia@diku.dk> Introduce a new label that includes kfree and jump to that one. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; expression E1!=0,E2,E3,E4; statement S; iterator I; @@ ( if (…) { … when != kfree(x) when != x = E3 …
Aug 20 2011
sound/soc/kirkwood/kirkwood-i2s.c: add missing kfree
Author: Julia Lawall <julia@diku.dk> Adjust the goto to jump to the error handling code that includes kfree. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; expression E1!=0,E2,E3,E4; statement S; iterator I; @@ ( if (…) { … when != kfree(x) when != x = …
Aug 13 2011
staging: rts_pstor: dont cast void* from kmalloc()
Author: Thomas Meyer <thomas@m3y3r.de> Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Greg Kroah-Hartman — drivers/staging/rts_pstor/sd.c | 4 ++– 1 file changed, 2 insertions(+), …
Aug 13 2011
staging: tidspbridge: dont cast void* from kmalloc()
Author: Thomas Meyer <thomas@m3y3r.de> Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Greg Kroah-Hartman — drivers/staging/tidspbridge/gen/gh.c | 2 +- 1 file changed, 1 insertion(+), …
Aug 13 2011
staging: altera-stapl: dont cast void* from kmalloc()
Author: Thomas Meyer <thomas@m3y3r.de> Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Greg Kroah-Hartman — drivers/staging/altera-stapl/altera.c | 2 +- 1 file changed, 1 insertion(+), …
Aug 13 2011
staging: ft1000: dont cast void* from kmalloc()
Author: Thomas Meyer <thomas@m3y3r.de> Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Greg Kroah-Hartman — drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 2 +- 1 file changed, 1 insertion(+), …
Aug 13 2011
Staging: rts_pstor: dont cast void* from kmalloc()
Author: Thomas Meyer <thomas@m3y3r.de> Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Greg Kroah-Hartman — drivers/staging/rts_pstor/spi.c | 2 +- 1 file changed, 1 insertion(+), …