s390/cio: add NULL test
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 20 Dec 2015 11:15:52 +0000 (12:15 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 30 Dec 2015 09:34:13 +0000 (10:34 +0100)
commit8cb708f3d35e78f00528caf2f681900d2c7883b8
tree0f85dd1a1582d9a2db90cf1732f8817038bc5ac1
parent11b64c8acca05d7e50a873e0e8758b75d6d6650f
s390/cio: add NULL test

Add NULL test on call to kzalloc.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x;
identifier fld;
@@

* x = kzalloc(...);
  ... when != x == NULL
  x->fld
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/con3215.c