linux-stable/drivers/s390/block
Julien Brunel 0983e56835 [S390] drivers/s390: Use an IS_ERR test rather than a NULL test
In case of error, functions dasd_kmalloc_request and idal_buffer_alloc
return an ERR pointer, but never return the NULL pointer. So after a
call to one of these functions, a NULL test should be replaced by an
IS_ERR test.

A simplified version of the semantic patch that makes this change is
as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@correct_null_test@
expression x,E;
statement S1, S2;
@@
x =
(
  dasd_kmalloc_request(...)
|
  idal_buffer_alloc(...)
)
<... when != x = E
if (
(
- x@p2 != NULL
+ ! IS_ERR ( x )
|
- x@p2 == NULL
+ IS_ERR( x )
)
 )
S1
else S2
...>
? x = E;
// </smpl>

Signed-off-by:  Julien Brunel <brunel@diku.dk>
Signed-off-by:  Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-08-21 19:46:39 +02:00
..
dasd.c [S390] cio: introduce fcx enabled scsw format 2008-07-14 10:02:07 +02:00
dasd_3990_erp.c [S390] cio: introduce fcx enabled scsw format 2008-07-14 10:02:07 +02:00
dasd_alias.c [S390] dasd: Add support for enhanced VM UID 2008-08-01 16:39:29 +02:00
dasd_devmap.c [S390] dasd: Add support for enhanced VM UID 2008-08-01 16:39:29 +02:00
dasd_diag.c [S390] dasd: use -EOPNOTSUPP instead of -ENOTSUPP 2008-07-17 17:22:10 +02:00
dasd_diag.h [S390] dasd whitespace and other cosmetics. 2006-06-29 14:58:12 +02:00
dasd_eckd.c [S390] dasd: Add support for enhanced VM UID 2008-08-01 16:39:29 +02:00
dasd_eckd.h [S390] dasd: Add support for enhanced VM UID 2008-08-01 16:39:29 +02:00
dasd_eer.c [S390] drivers/s390: Use an IS_ERR test rather than a NULL test 2008-08-21 19:46:39 +02:00
dasd_erp.c [S390] dasd: add hyper PAV support to DASD device driver, part 1 2008-01-26 14:11:28 +01:00
dasd_fba.c [S390] dasd: Fix cleanup in dasd_{fba,diag}_check_characteristics(). 2008-07-17 17:22:08 +02:00
dasd_fba.h [S390] dasd whitespace and other cosmetics. 2006-06-29 14:58:12 +02:00
dasd_genhd.c [S390] dasd: add hyper PAV support to DASD device driver, part 1 2008-01-26 14:11:28 +01:00
dasd_int.h [S390] dasd: Add support for enhanced VM UID 2008-08-01 16:39:29 +02:00
dasd_ioctl.c [S390] dasd: add hyper PAV support to DASD device driver, part 1 2008-01-26 14:11:28 +01:00
dasd_proc.c s390: use non-racy method for proc entries creation 2008-04-29 08:06:21 -07:00
dcssblk.c [S390] Cleanup dcssblk printk messages. 2008-07-14 10:02:23 +02:00
Kconfig [S390] dasd: fix double elevator_exit call when deadline iosched fails to load 2008-04-17 07:46:55 +02:00
Makefile [S390] dasd: add hyper PAV support to DASD device driver, part 1 2008-01-26 14:11:28 +01:00
xpram.c [S390] Cleanup xpram printk messages. 2008-07-14 10:02:18 +02:00