linux/drivers/s390
Julia Lawall 21e7b2c4d5 [S390] drivers/s390/crypto: Move dereference to after IS_ERR test
If reply is ERR_PTR(...), then it should not be dereferenced, so I have
moved the dereference from the declaration to after the IS_ERR test.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@match exists@
expression x, E;
identifier fld;
position p1,p2;
@@

(
x = E;
|
x = E
|
x@p1->fld
... when != x = E
IS_ERR(x@p2)
... when any
)

@other_match exists@
expression match.x, E1, E2;
position match.p1,match.p2;
@@

x = E1
... when != x = E2
    when != x@p1
x@p2

@ script:python depends on !other_match@
p1 << match.p1;
p2 << match.p2;
@@

print "* file %s dereference %s test %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-25 13:39:16 +01:00
..
block [S390] struct device - replace bus_id with dev_name(), dev_set_name() 2008-12-25 13:39:03 +01:00
char [S390] sclp vt220: fix compile warning 2008-12-25 13:39:12 +01:00
cio [S390] cio: use pim to check for multipath. 2008-12-25 13:39:11 +01:00
crypto [S390] drivers/s390/crypto: Move dereference to after IS_ERR test 2008-12-25 13:39:16 +01:00
kvm [S390] kvm_s390: Fix oops in virtio device detection with "mem=" 2008-11-14 18:18:52 +01:00
net [S390] service level interface. 2008-12-25 13:39:00 +01:00
scsi [S390] struct device - replace bus_id with dev_name(), dev_set_name() 2008-12-25 13:39:03 +01:00
ebcdic.c
Makefile s390: KVM guest: virtio device support, and kvm hypercalls 2008-04-27 12:00:51 +03:00
s390_rdev.c [S390] bus_id -> dev_set_name() changes 2008-10-10 21:33:50 +02:00
s390mach.c [S390] stp support. 2008-07-14 10:02:09 +02:00
s390mach.h [S390] stp support. 2008-07-14 10:02:09 +02:00
sysinfo.c [S390] service level interface. 2008-12-25 13:39:00 +01:00