Author: Peter Senna Tschudin <peter.senna@gmail.com> Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { … kfree@p2(x); … return …; } @unchanged exists@ position r.p1,r.p2; expression e
Category: Linux
Sep 12 2012
[media] drivers/media/platform/davinci/vpbe.c: Removes useless kfree()
Author: Peter Senna Tschudin <peter.senna@gmail.com> Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { … kfree@p2(x); … return …; } @unchanged exists@ position r.p1,r.p2; expression e
Sep 12 2012
[media] drivers/media/tuners/mt2063.c: Removes useless kfree()
Author: Peter Senna Tschudin <peter.senna@gmail.com> Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { … kfree@p2(x); … return …; } @unchanged exists@ position r.p1,r.p2; expression e
Sep 12 2012
drivers/sbus/char: removes unnecessary semicolon
Author: Peter Senna Tschudin <peter.senna@gmail.com> removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin Signed-off-by: David S. Miller — drivers/sbus/char/display7seg.c | 2 +- drivers/sbus/char/envctrl.c | 8 ++++—- drivers/sbus/char/openprom.c | 4 ++– 3 files changed, 7 insertions(+), 7 deletions(-) diff –git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index 4b99397..b160073 100644 — a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c @@ -150,7 +150,7 …
Sep 12 2012
arch/sparc/kernel/pci_sun4v.c: removes unnecessary semicolon
Author: Peter Senna Tschudin <peter.senna@gmail.com> removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin Signed-off-by: David S. Miller — arch/sparc/kernel/pci_sun4v.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 7661e84..051b69c 100644 — a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c @@ -594,7 +594,7 @@ static int __devinit pci_sun4v_iommu_init(struct pci_pbm_info *pbm) printk(KERN_ERR …
Sep 12 2012
drivers/isdn/gigaset/common.c: Remove useless kfree
Author: Peter Senna Tschudin <peter.senna@gmail.com> Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { … kfree@p2(x); … return …; } @unchanged exists@ position r.p1,r.p2; expression e
Sep 10 2012
hwspinlock/core: move the dereference below the NULL test
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Ohad Ben-Cohen — drivers/hwspinlock/hwspinlock_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff –git a/drivers/hwspinlock/hwspinlock_core.c b/drivers/hwspinlock/hwspinlock_core.c index 1201a15..db713c0 100644 — a/drivers/hwspinlock/hwspinlock_core.c +++ b/drivers/hwspinlock/hwspinlock_core.c @@ …
Sep 10 2012
[IA64] kexec: Move the dereference below the NULL test
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Tony Luck — arch/ia64/kernel/machine_kexec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff –git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c index 070e8ef..5151a64 100644 — a/arch/ia64/kernel/machine_kexec.c +++ b/arch/ia64/kernel/machine_kexec.c @@ …
Sep 10 2012
ARM: davinci: dm644x evm: move pointer dereference below NULL check
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Pointer dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Sekhar Nori — arch/arm/mach-davinci/board-dm644x-evm.c | 5 +++– 1 file changed, 3 insertions(+), 2 deletions(-) diff –git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index f22572ce..f8a99ee 100644 — a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ …
Sep 10 2012
usb: otg: move the dereference below the NULL test
Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Felipe Balbi — drivers/usb/otg/fsl_otg.c | 34 ++++++++++++++++++++++++———- 1 file changed, 24 insertions(+), 10 deletions(-) diff –git a/drivers/usb/otg/fsl_otg.c b/drivers/usb/otg/fsl_otg.c index 23c798c..c19d1d7 100644 — a/drivers/usb/otg/fsl_otg.c +++ b/drivers/usb/otg/fsl_otg.c @@ …