1
0
Fork 0

staging: kpc2000: simplify comparison to NULL in dma.c

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

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Link: https://lore.kernel.org/r/20190704060811.10330-3-simon@nikanor.nu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
alistair/sunxi64-5.4-dsi
Simon Sandström 2019-07-04 08:08:10 +02:00 committed by Greg Kroah-Hartman
parent 209ff937b0
commit a50d99d401
1 changed files with 2 additions and 2 deletions

View File

@ -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;