diff options
author | Eva Rachel Retuya <eraretuya@gmail.com> | 2016-02-27 20:39:24 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-11 22:09:09 -0800 |
commit | 7586170c84de561c7bf05dd0df0c4bf9786417d5 (patch) | |
tree | a698c5792626b23e9aad5c0cdbff6d80f380f77c /drivers/staging/rts5208/sd.c | |
parent | eff8bf82432b6a3cd367e765a1806ebe3d1556e8 (diff) |
staging: rts5208: simplify NULL tests
Replace direct comparisons to NULL i.e. 'x == NULL' with '!x' for
consistency. Coccinelle semantic patch used:
@@
identifier func;
expression x;
statement Z;
@@
x = func(...);
if (
(
+ !
x
- == NULL
|
+ !
- NULL ==
x
)
) Z
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rts5208/sd.c')
-rw-r--r-- | drivers/staging/rts5208/sd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c index 1612610c1f56..87d697623cba 100644 --- a/drivers/staging/rts5208/sd.c +++ b/drivers/staging/rts5208/sd.c @@ -4588,7 +4588,7 @@ int sd_execute_read_data(struct scsi_cmnd *srb, struct rtsx_chip *chip) cmd[4] = srb->cmnd[6]; buf = kmalloc(data_len, GFP_KERNEL); - if (buf == NULL) { + if (!buf) { rtsx_trace(chip); return TRANSPORT_ERROR; } @@ -4871,7 +4871,7 @@ int sd_execute_write_data(struct scsi_cmnd *srb, struct rtsx_chip *chip) u8 *buf; buf = kmalloc(data_len, GFP_KERNEL); - if (buf == NULL) { + if (!buf) { rtsx_trace(chip); return TRANSPORT_ERROR; } |