Commit 937cb2f2 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Vinod Koul

dmaengine: pl330: Remove non-NULL check for pl330_submit_req parameters

The pl330_submit_req() checked supplied 'struct pl330_thread thrd' and
'struct dma_pl330_desc desc' parameters for non-NULL. However these
checks are useless because supplied arguments won't be NULL.

The pl330_submit_req() is called in only one place and:
1. 'desc' is already dereferenced in fill_queue() before calling
   pl330_submit_req().
2. 'thrd' is always dereferenced after calling
   fill_queue()->pl330_submit_req().

Removing the checks for non-NULL values fixes following warning:
drivers/dma/pl330.c:1376 pl330_submit_req() warn: variable dereferenced before check 'thrd' (see line 1367)
Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent fe6cf289
...@@ -1372,10 +1372,6 @@ static int pl330_submit_req(struct pl330_thread *thrd, ...@@ -1372,10 +1372,6 @@ static int pl330_submit_req(struct pl330_thread *thrd,
u32 ccr; u32 ccr;
int ret = 0; int ret = 0;
/* No Req or Unacquired Channel or DMAC */
if (!desc || !thrd || thrd->free)
return -EINVAL;
regs = thrd->dmac->base; regs = thrd->dmac->base;
if (pl330->state == DYING if (pl330->state == DYING
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment