]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/dma/ste_dma40.c
dmaengine: ste_dma40: fix error return code
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 22 Nov 2014 14:39:19 +0000 (15:39 +0100)
committerVinod Koul <vinod.koul@intel.com>
Fri, 5 Dec 2014 17:55:48 +0000 (23:25 +0530)
commit39375334a1c18f63faefeebea74363a705b87f0a
treecf4d75c3c2d5ccf12a05b00690f425be16a02fee
parent0f927a11b67a4713d368b963e63dd36350ce91dc
dmaengine: ste_dma40: fix error return code

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/)

// <smpl>
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret < 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/ste_dma40.c