Author: Julia Lawall <julia@diku.dk> The return -EINVAL appears to only make sense if the if branch that it is aligned with is taken, and the indentation indicates that this is the authors intent, so move it into that branch. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r disable braces4@ position …
Category: Linux
Sep 29 2010
spi/orion: Drop unnecessary null test
Author: Julia Lawall <julia@diku.dk> list_for_each_entry binds its first argument to a non-null value, and thus any null test on the value of that argument is superfluous. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ iterator I; expression x,E; @@ I(x,…) { } // Signed-off-by: Julia Lawall Signed-off-by: Grant Likely — …
Sep 28 2010
staging: wlags49_h2: use free_netdev(netdev) instead of kfree()
Author: Vasiliy Kulikov <segooon@gmail.com> Freeing netdev without free_netdev() leads to net, tx leaks. I might lead to dereferencing freed pointer. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) @@ struct net_device* dev; @@ -kfree(dev) +free_netdev(dev) Signed-off-by: Vasiliy Kulikov Signed-off-by: Greg Kroah-Hartman — drivers/staging/wlags49_h2/wl_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 …
Sep 28 2010
staging: slicoss: use free_netdev(netdev) instead of kfree()
Author: Vasiliy Kulikov <segooon@gmail.com> Freeing netdev without free_netdev() leads to net, tx leaks. I might lead to dereferencing freed pointer. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) @@ struct net_device* dev; @@ -kfree(dev) +free_netdev(dev) Signed-off-by: Vasiliy Kulikov Acked-by: Denis Kirjanov Signed-off-by: Greg Kroah-Hartman — drivers/staging/slicoss/slicoss.c | 2 +- 1 file changed, …
Sep 28 2010
staging: otus: use free_netdev(netdev) instead of kfree()
Author: Vasiliy Kulikov <segooon@gmail.com> Freeing netdev without free_netdev() leads to net, tx leaks. I might lead to dereferencing freed pointer. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) @@ struct net_device* dev; @@ -kfree(dev) +free_netdev(dev) Signed-off-by: Vasiliy Kulikov Signed-off-by: Greg Kroah-Hartman — drivers/staging/otus/usbdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 …
Sep 27 2010
s390: use free_netdev(netdev) instead of kfree()
Author: Vasiliy Kulikov <segooon@gmail.com> Freeing netdev without free_netdev() leads to net, tx leaks. I might lead to dereferencing freed pointer. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) @@ struct net_device* dev; @@ -kfree(dev) +free_netdev(dev) Signed-off-by: David S. Miller — drivers/s390/net/ctcm_main.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-) …
Sep 26 2010
sgiseeq: use free_netdev(netdev) instead of kfree()
Author: Kulikov Vasiliy <segooon@gmail.com> Freeing netdev without free_netdev() leads to net, tx leaks. I might lead to dereferencing freed pointer. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) @@ struct net_device* dev; @@ -kfree(dev) +free_netdev(dev) Signed-off-by: David S. Miller — drivers/net/sgiseeq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) …
Sep 26 2010
rionet: use free_netdev(netdev) instead of kfree()
Author: Kulikov Vasiliy <segooon@gmail.com> Freeing netdev without free_netdev() leads to net, tx leaks. I might lead to dereferencing freed pointer. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) @@ struct net_device* dev; @@ -kfree(dev) +free_netdev(dev) Signed-off-by: David S. Miller — drivers/net/rionet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) …
Sep 26 2010
ibm_newemac: use free_netdev(netdev) instead of kfree()
Author: Kulikov Vasiliy <segooon@gmail.com> Freeing netdev without free_netdev() leads to net, tx leaks. I might lead to dereferencing freed pointer. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) @@ struct net_device* dev; @@ -kfree(dev) +free_netdev(dev) Signed-off-by: David S. Miller — drivers/net/ibm_newemac/core.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-) …
Sep 10 2010
drivers/mmc/host/imxmmc.c: adjust confusing if indentation
Author: Julia Lawall <julia@diku.dk> Move the second if (reg & …) test into the branch indicated by its indentation. The test was previously always executed after the if containing that branch, but it was always false unless the if branch was taken. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r …