Author: Markus Elfring <elfring@users.sourceforge.net> The of_node_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Scott Wood — arch/powerpc/platforms/83xx/usb.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff …
Category: Linux
Nov 22 2014
usb: dwc3: return error code from the most recent call
Author: Julia Lawall <Julia.Lawall@lip6.fr> Copy-paste error from the previous block of error handling code. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,e1; @@ if (IS_ERR(e)) { … ( ret = PTR_ERR(e); | * ret = PTR_ERR(e1); ) … return ret; } // Signed-off-by: Julia …
Nov 22 2014
dmaengine: ste_dma40: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = …
Nov 22 2014
solos-pci: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = …
Nov 22 2014
HSI: nokia-modem: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = …
Nov 22 2014
s390/pci: Deletion of unnecessary checks before the function call “debug_unregister”
Author: Markus Elfring <elfring@users.sourceforge.net> The debug_unregister() function performs also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky — arch/s390/pci/pci_debug.c | 7 ++—– 1 file changed, 2 insertions(+), 5 deletions(-) diff –git a/arch/s390/pci/pci_debug.c …
Nov 21 2014
IDE: Deletion of an unnecessary check before the function call “module_put”
Author: Markus Elfring <elfring@users.sourceforge.net> The module_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: David S. Miller — drivers/ide/ide.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) …
Nov 21 2014
ALSA: sb: Deletion of unnecessary checks before two function calls
Author: Markus Elfring <elfring@users.sourceforge.net> The functions release_and_free_resource() and snd_util_memhdr_free() test whether their argument is NULL and then return immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Takashi Iwai — sound/isa/sb/emu8000_synth.c | 3 +– sound/isa/sb/sb_common.c | 3 +– 2 files changed, …
Nov 21 2014
ALSA: es1688_lib: Deletion of an unnecessary check before the function call “release_and_free_resource”
Author: Markus Elfring <elfring@users.sourceforge.net> The release_and_free_resource() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Takashi Iwai — sound/isa/es1688/es1688_lib.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff …
Nov 21 2014
ALSA: core: Deletion of unnecessary checks before two function calls
Author: Markus Elfring <elfring@users.sourceforge.net> The functions snd_seq_oss_timer_delete() and vunmap() perform also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Takashi Iwai — sound/core/seq/oss/seq_oss_init.c | 9 +++—— sound/core/sgbuf.c | 3 +– 2 files changed, 4 insertions(+), 8 deletions(-) …