Author: Julia Lawall <julia@diku.dk> Add a call to of_node_put in the error handling code following a call to of_find_compatible_node. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression x; expression E,E1; statement S; @@ *x = (of_find_node_by_path |of_find_node_by_name |of_find_node_by_phandle |of_get_parent |of_get_next_parent |of_get_next_child |of_find_compatible_node |of_match_node )(…); … if (x …
Catégorie : Coccinelle
Aug 29 2010
powerpc/5200: mpc52xx_uart.c: Add of_node_put to avoid memory leak
Author: Julia Lawall <julia@diku.dk> Add a call to of_node_put in the error handling code following a call to of_find_compatible_node. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression x; expression E,E1; statement S; @@ *x = (of_find_node_by_path |of_find_node_by_name |of_find_node_by_phandle |of_get_parent |of_get_next_parent |of_get_next_child |of_find_compatible_node |of_match_node )(…); … if (x …
Aug 29 2010
powerpc/cell: Add of_node_put to avoid memory leak
Author: Julia Lawall <julia@diku.dk> Add calls to of_node_put in the error handling code following calls to of_find_node_by_path and of_find_node_by_phandle. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression x; expression E,E1; statement S; @@ *x = (of_find_node_by_path |of_find_node_by_name |of_find_node_by_phandle |of_get_parent |of_get_next_parent |of_get_next_child |of_find_compatible_node |of_match_node )(…); … if (x …
Aug 29 2010
powerpc/maple: Add of_node_put to avoid memory leak
Author: Julia Lawall <julia@diku.dk> Add a call to of_node_put in the error handling code following a call to of_find_node_by_path. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression x; expression E,E1; statement S; @@ *x = (of_find_node_by_path |of_find_node_by_name |of_find_node_by_phandle |of_get_parent |of_get_next_parent |of_get_next_child |of_find_compatible_node |of_match_node )(…); … if (x …
Aug 29 2010
powerpc/powermac/pfunc_core.c: Add of_node_put to avoid memory leak
Author: Julia Lawall <julia@diku.dk> Add a call to of_node_put in the error handling code following a call to of_find_node_by_phandle. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression x; expression E,E1; statement S; @@ *x = (of_find_node_by_path |of_find_node_by_name |of_find_node_by_phandle |of_get_parent |of_get_next_parent |of_get_next_child |of_find_compatible_node |of_match_node )(…); … if (x …
Aug 29 2010
powerpc/via-pmu-led.c: Add of_node_put to avoid memory leak
Author: Julia Lawall <julia@diku.dk> Add a call to of_node_put in the error handling code following a call to of_find_node_by_path. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ local idexpression x; expression E,E1; statement S; @@ *x = (of_find_node_by_path |of_find_node_by_name |of_find_node_by_phandle |of_get_parent |of_get_next_parent |of_get_next_child |of_find_compatible_node |of_match_node )(…); … if (x …
Aug 28 2010
USB: gadget: amd5536udc.c: Remove double test
Author: Julia Lawall <julia@diku.dk> The same expression is tested twice and the result is the same each time. Instead test for use_dma_ppb as in the test above. The sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @expression@ expression E; @@ ( * E || … || E | * E && … …
Aug 28 2010
net/wireless: Remove double test
Author: Julia Lawall <julia@diku.dk> The same expression is tested twice and the result is the same each time. The sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @expression@ expression E; @@ ( * E || … || E | * E && … && E ) // Signed-off-by: Julia Lawall Signed-off-by: John …
Aug 28 2010
V4L/DVB: drivers/media/dvb/siano: Remove double test
Author: Julia Lawall <julia@diku.dk> The same expression is tested twice and the result is the same each time. The sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @expression@ expression E; @@ ( * E || … || E | * E && … && E ) // Signed-off-by: Julia Lawall Signed-off-by: Mauro …
Aug 28 2010
x86, kmemcheck: Remove double test
Author: Julia Lawall <julia@diku.dk> The opcodes 0x2e and 0x3e are tested for in the first Group 2 line as well. The sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @expression@ expression E; @@ ( * E || … || E | * E && … && E ) // Signed-off-by: Julia Lawall …