https://github.com/torvalds/linux
Revision ab576627c8f97c08297d81537be17df161171923 authored by Julia Lawall on 29 December 2013, 22:47:29 UTC, committed by Roland Dreier on 12 February 2014, 19:11:46 UTC
Set the return variable to an error code as done elsewhere in the function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

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

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Roland Dreier <roland@purestorage.com>
1 parent 38dbfb5
History
Tip revision: ab576627c8f97c08297d81537be17df161171923 authored by Julia Lawall on 29 December 2013, 22:47:29 UTC
RDMA/amso1100: Fix error return code
Tip revision: ab57662
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.1 KB
.mailmap -rw-r--r-- 4.4 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 93.3 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 266.4 KB
Makefile -rw-r--r-- 49.1 KB
README -rw-r--r-- 18.3 KB
REPORTING-BUGS -rw-r--r-- 7.3 KB

README

back to top