From 7586170c84de561c7bf05dd0df0c4bf9786417d5 Mon Sep 17 00:00:00 2001 From: Eva Rachel Retuya Date: Sat, 27 Feb 2016 20:39:24 +0800 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rts5208/xd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/staging/rts5208/xd.c') 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; } -- cgit v1.2.3