Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1332519
| From | Shaun Ren <shaun.ren@linux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v4 8/8] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL |
| Date | 2016-02-12 05:20 +0100 |
| Message-ID | <r1dn5-1PZ-29@gated-at.bofh.it> (permalink) |
| References | <r0t0R-4sE-3@gated-at.bofh.it> <r1dn4-1PZ-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/9] Staging: rts5208: Coding style and dma mapping fixes Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v3 8/9] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v3 5/9] Staging: rts5208: rtsx_transport.c: Remove extra newlines Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v3 2/9] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
Re: [PATCH v3 2/9] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Joe Perches <joe@perches.com> - 2016-02-10 04:00 +0100
[PATCH v3 1/9] Staging: rts5208: rtsx_transport.c: Cleanup comments Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
Re: [PATCH v3 1/9] Staging: rts5208: rtsx_transport.c: Cleanup comments Joshua Clayton <stillcompiling@gmail.com> - 2016-02-10 04:30 +0100
[PATCH v3 7/9] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v3 4/9] Staging: rts5208: rtsx_transport.c: Add spaces around - Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v3 9/9] Staging: rts5208: Add missing dma_mapping_error Shaun Ren <shaun.ren@linux.com> - 2016-02-10 03:50 +0100
[PATCH v4 7/8] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 4/8] Staging: rts5208: rtsx_transport.c: Add spaces around - Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 6/8] Staging: rts5208: rtsx_transport.c: Fix label naming convention Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 0/8] Staging: rts5208: Fix coding style Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 1/8] Staging: rts5208: rtsx_transport.c: Cleanup comments Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 8/8] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 2/8] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
Re: [PATCH v4 2/8] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Joe Perches <joe@perches.com> - 2016-02-12 05:40 +0100
[PATCH v5 2/8] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren <shaun.ren@linux.com> - 2016-02-12 08:00 +0100
Re: [PATCH v5 2/8] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Greg KH <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH v4 3/8] Staging: rts5208: rtsx_transport.c: Remove spaces after casts Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v4 5/8] Staging: rts5208: rtsx_transport.c: Remove extra newlines Shaun Ren <shaun.ren@linux.com> - 2016-02-12 05:20 +0100
[PATCH v5 RESEND 3/8] Staging: rts5208: rtsx_transport.c: Remove spaces after casts Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:00 +0100
[PATCH v5 RESEND 7/8] Staging: rts5208: rtsx_transport.c: Remove unnecessary parentheses Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:00 +0100
[PATCH v5 RESEND 6/8] Staging: rts5208: rtsx_transport.c: Fix label naming convention Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:00 +0100
[PATCH v5 RESEND 8/8] Staging: rts5208: rtsx_transport.c: Fix comparisons to NULL Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:00 +0100
[PATCH v5 RESEND 0/8] Staging: rts5208: Fix coding style Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:00 +0100
[PATCH v5 RESEND 1/8] Staging: rts5208: rtsx_transport.c: Cleanup comments Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:00 +0100
[PATCH v5 RESEND 4/8] Staging: rts5208: rtsx_transport.c: Add spaces around - Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:10 +0100
[PATCH v5 RESEND 5/8] Staging: rts5208: rtsx_transport.c: Remove extra newlines Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:10 +0100
[PATCH v5 RESEND 2/8] Staging: rts5208: rtsx_transport.c: Align to open parenthesis Shaun Ren <shaun.ren@linux.com> - 2016-02-15 20:10 +0100
csiph-web