lkml.org 
[lkml]   [2016]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 8/8] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL
Date
This patch changes all comparsions to NULL with !..., as reported by
checkpatch.pl.

Signed-off-by: Shaun Ren <shaun.ren@linux.com>
---
drivers/staging/rts5208/rtsx_transport.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c
index be3423a..73e50ec 100644
--- a/drivers/staging/rts5208/rtsx_transport.c
+++ b/drivers/staging/rts5208/rtsx_transport.c
@@ -338,7 +338,7 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card,
struct scatterlist *sg_ptr;
u32 val = TRIG_DMA;

- if ((sg == NULL) || (num_sg <= 0) || !offset || !index)
+ if (!sg || (num_sg <= 0) || !offset || !index)
return -EIO;

if (dma_dir == DMA_TO_DEVICE)
@@ -502,7 +502,7 @@ static int rtsx_transfer_sglist_adma(struct rtsx_chip *chip, u8 card,
long timeleft;
struct scatterlist *sg_ptr;

- if ((sg == NULL) || (num_sg <= 0))
+ if (!sg || (num_sg <= 0))
return -EIO;

if (dma_dir == DMA_TO_DEVICE)
@@ -649,7 +649,7 @@ static int rtsx_transfer_buf(struct rtsx_chip *chip, u8 card, void *buf,
u32 val = 1 << 31;
long timeleft;

- if ((buf == NULL) || (len <= 0))
+ if (!buf || (len <= 0))
return -EIO;

if (dma_dir == DMA_TO_DEVICE)
--
2.7.0
\
 
 \ /
  Last update: 2016-02-12 06:01    [W:0.158 / U:23.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site