diff options
author | Bhaktipriya Shridhar <bhaktipriya96@gmail.com> | 2016-03-06 02:39:51 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-11 22:09:09 -0800 |
commit | e6e1d57e080583da7aa851aca40369f1851dec57 (patch) | |
tree | d539803eb2ea63fb12d16746b68c98483b499962 /drivers/staging/rts5208 | |
parent | b242d05fa3ec5baf83f7a51c7c58757fcf36e321 (diff) | |
download | linux-e6e1d57e080583da7aa851aca40369f1851dec57.tar.gz linux-e6e1d57e080583da7aa851aca40369f1851dec57.tar.bz2 linux-e6e1d57e080583da7aa851aca40369f1851dec57.zip |
staging: rts5208: Change form of NULL comparisons
Change null comparisons of the form x == NULL to !x.
This was done using Coccinelle.
@@
expression e;
@@
- e == NULL
+ !e
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rts5208')
-rw-r--r-- | drivers/staging/rts5208/ms.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c index 643301589bde..a780185a3754 100644 --- a/drivers/staging/rts5208/ms.c +++ b/drivers/staging/rts5208/ms.c @@ -2468,7 +2468,7 @@ static u16 ms_get_l2p_tbl(struct rtsx_chip *chip, int seg_no, u16 log_off) struct ms_info *ms_card = &chip->ms_card; struct zone_entry *segment; - if (ms_card->segment == NULL) + if (!ms_card->segment) return 0xFFFF; segment = &(ms_card->segment[seg_no]); @@ -2485,7 +2485,7 @@ static void ms_set_l2p_tbl(struct rtsx_chip *chip, struct ms_info *ms_card = &chip->ms_card; struct zone_entry *segment; - if (ms_card->segment == NULL) + if (!ms_card->segment) return; segment = &(ms_card->segment[seg_no]); @@ -2589,7 +2589,7 @@ static int ms_build_l2p_tbl(struct rtsx_chip *chip, int seg_no) dev_dbg(rtsx_dev(chip), "ms_build_l2p_tbl: %d\n", seg_no); - if (ms_card->segment == NULL) { + if (!ms_card->segment) { retval = ms_init_l2p_tbl(chip); if (retval != STATUS_SUCCESS) { rtsx_trace(chip); @@ -2610,7 +2610,7 @@ static int ms_build_l2p_tbl(struct rtsx_chip *chip, int seg_no) segment = &(ms_card->segment[seg_no]); - if (segment->l2p_table == NULL) { + if (!segment->l2p_table) { segment->l2p_table = vmalloc(table_size * 2); if (!segment->l2p_table) { rtsx_trace(chip); @@ -2619,7 +2619,7 @@ static int ms_build_l2p_tbl(struct rtsx_chip *chip, int seg_no) } memset((u8 *)(segment->l2p_table), 0xff, table_size * 2); - if (segment->free_table == NULL) { + if (!segment->free_table) { segment->free_table = vmalloc(MS_FREE_TABLE_CNT * 2); if (!segment->free_table) { rtsx_trace(chip); |