ASoC: am3517evm: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> It was forgotten to initialize ret to the result of calling snd_soc_dai_set_sysclk, unlike at the other calls in the same 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 …

Lire la suite

ALSA: sound/ppc/snd_ps3.c: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> Initialize ret before returning on failure, as done 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 ) ... when != ret = e1 …

Lire la suite

ALSA: sound/atmel/abdac.c: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> Initialize retval before returning from a failed call to ioremap. 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 ) ... when != ret = e1 when != …

Lire la suite

ALSA: sound/atmel/ac97c.c: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> In the first case, the second test of whether retval is negative is redundant. It is dropped and the previous and subsequent tests are combined. In the second case, add an initialization of retval on failure of ioremap. A simplified version of the semantic match that finds this problem is as …

Lire la suite

ALSA: sound/pci/ctxfi/ctatc.c: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> Initialize err before returning on failure, as done 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 ) ... when != ret = e1 …

Lire la suite

ALSA: sound/pci/sis7019.c: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> Initialize rc before returning on failure, as done 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 ) ... when != ret = e1 …

Lire la suite

ALSA: sound/pci/rme9652/hdspm.c: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> 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 ) ... when …

Lire la suite

ASoC: ux500_msp_i2s: better use devm functions and fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> Remove unnecessary calls to devm_kfree and replace iounmap by devm_iounmap (and use resource_size for the third argument). These changes make it possible to remove the error-handling code at the end of ux500_msp_i2s_init_msp, and all of the gotos become direct returns. In the case of the second call to devm_kzalloc, the return …

Lire la suite

ASoC: imx-sgtl5000: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> Initialize ret on the second call to imx_audmux_v2_configure_port so that the subsequent test checks that result and not the previous one. 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 …

Lire la suite

[media] m5mols: introduce missing initialization

Author: Julia Lawall <Julia.Lawall@lip6.fr> The result of one call to a function is tested, and then at the second call to the same function, the previous result, and not the current result, is tested again. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression ret; identifier f; statement S1,S2; @@ …

Lire la suite