Author: Peter Senna Tschudin <peter.senna@gmail.com> Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... …
Category: Linux
Sep 04 2012
[media] drivers/media/rc/ati_remote.c: fix error return code
Author: Peter Senna Tschudin <peter.senna@gmail.com> Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... …
Sep 04 2012
[media] drivers/media/platform/davinci/vpfe_capture.c: fix error return code
Author: Peter Senna Tschudin <peter.senna@gmail.com> Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... …
Sep 04 2012
sctp: use list_move_tail instead of list_del/list_add_tail
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller — net/sctp/outqueue.c | 10 ++++—— 1 file changed, 4 insertions(+), 6 deletions(-) diff –git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 072bf6a..d16632e 100644 — a/net/sctp/outqueue.c +++ b/net/sctp/outqueue.c @@ …
Sep 03 2012
gpio/omap: fix possible memory leak in omap2_gpio_dev_init()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> pdata and pdata->regs have been allocated in this function and should be freed before leaving it, and in the other error handling cases too. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Acked-by: Kevin Hilman Signed-off-by: Tony Lindgren — arch/arm/mach-omap2/gpio.c | 2 ++ 1 …
Sep 03 2012
staging: csr: fix possible memory leak in do_patch_convert_download()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> pfw has been allocated in function xbv_to_patch() and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman — drivers/staging/csr/csr_wifi_hip_download.c | 2 ++ 1 file changed, 2 insertions(+) diff –git a/drivers/staging/csr/csr_wifi_hip_download.c b/drivers/staging/csr/csr_wifi_hip_download.c …
Sep 03 2012
parport: fix possible memory leak in parport_gsc_probe_port()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> ops has been allocated in this function and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman — drivers/parport/parport_gsc.c | 1 + 1 file changed, 1 insertion(+) diff –git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c …
Sep 03 2012
staging: bcm: fix possible memory leak in bcm_char_ioctl()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> psFwInfo has been allocated in this function and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman — drivers/staging/bcm/Bcmchar.c | 2 ++ 1 file changed, 2 insertions(+) diff –git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c …
Sep 03 2012
mISDN: fix possible memory leak in hfcmulti_init()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> hc has been allocated in this function and missing free it before leaving from some error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller — drivers/isdn/hardware/mISDN/hfcmulti.c | 2 ++ 1 file changed, 2 insertions(+) diff –git a/drivers/isdn/hardware/mISDN/hfcmulti.c …
Sep 02 2012
parisc: fix possible memory leak in pat_query_module()
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> pa_pdc_cell has been allocated in this function and so should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Helge Deller — arch/parisc/kernel/inventory.c | 2 ++ 1 file changed, 2 insertions(+) diff –git a/arch/parisc/kernel/inventory.c …