summaryrefslogtreecommitdiff
path: root/drivers/staging/rts5208/xd.c
diff options
context:
space:
mode:
authorEva Rachel Retuya <eraretuya@gmail.com>2016-02-27 15:39:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-12 09:09:09 +0300
commit7586170c84de561c7bf05dd0df0c4bf9786417d5 (patch)
treea698c5792626b23e9aad5c0cdbff6d80f380f77c /drivers/staging/rts5208/xd.c
parenteff8bf82432b6a3cd367e765a1806ebe3d1556e8 (diff)
downloadlinux-7586170c84de561c7bf05dd0df0c4bf9786417d5.tar.xz
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/xd.c')
-rw-r--r--drivers/staging/rts5208/xd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rts5208/xd.c b/drivers/staging/rts5208/xd.c
index 10fea7bb8f30..fe84f757d575 100644
--- a/drivers/staging/rts5208/xd.c
+++ b/drivers/staging/rts5208/xd.c
@@ -1435,7 +1435,7 @@ static int xd_build_l2p_tbl(struct rtsx_chip *chip, int zone_no)
if (zone->l2p_table == NULL) {
zone->l2p_table = vmalloc(2000);
- if (zone->l2p_table == NULL) {
+ if (!zone->l2p_table) {
rtsx_trace(chip);
goto Build_Fail;
}
@@ -1444,7 +1444,7 @@ static int xd_build_l2p_tbl(struct rtsx_chip *chip, int zone_no)
if (zone->free_table == NULL) {
zone->free_table = vmalloc(XD_FREE_TABLE_CNT * 2);
- if (zone->free_table == NULL) {
+ if (!zone->free_table) {
rtsx_trace(chip);
goto Build_Fail;
}