[PATCH 2/3] staging: kpc2000: simplify comparison to NULL in dma.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes checkpatch warning "Comparison to NULL could be written [...]".

Signed-off-by: Simon Sandström <simon@xxxxxxxxxx>
---
 drivers/staging/kpc2000/kpc_dma/dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc_dma/dma.c b/drivers/staging/kpc2000/kpc_dma/dma.c
index 8092d0cf4a4a..51a4dd534a0d 100644
--- a/drivers/staging/kpc2000/kpc_dma/dma.c
+++ b/drivers/staging/kpc2000/kpc_dma/dma.c
@@ -119,7 +119,7 @@ int  setup_dma_engine(struct kpc_dma_device *eng, u32 desc_cnt)
 	cur = eng->desc_pool_first;
 	for (i = 1 ; i < eng->desc_pool_cnt ; i++) {
 		next = dma_pool_alloc(eng->desc_pool, GFP_KERNEL | GFP_DMA, &next_handle);
-		if (next == NULL)
+		if (!next)
 			goto done_alloc;
 
 		clear_desc(next);
@@ -245,7 +245,7 @@ int  count_descriptors_available(struct kpc_dma_device *eng)
 
 void  clear_desc(struct kpc_dma_descriptor *desc)
 {
-	if (desc == NULL)
+	if (!desc)
 		return;
 	desc->DescByteCount         = 0;
 	desc->DescStatusErrorFlags  = 0;
-- 
2.20.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux