diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2014-09-29 08:42:18 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-10-15 04:00:09 -0400 |
commit | 937cb2f2498dcbd8bcf6d79dcc24e5c8a3627067 (patch) | |
tree | 6823ee249fe36afe43bab4c524fd632817aa64ec | |
parent | fe6cf28936cc948cd1045568975c5b0d196e76d4 (diff) |
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: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/pl330.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index d5149aacd2fe..57049f84d0c0 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
@@ -1372,10 +1372,6 @@ static int pl330_submit_req(struct pl330_thread *thrd, | |||
1372 | u32 ccr; | 1372 | u32 ccr; |
1373 | int ret = 0; | 1373 | int ret = 0; |
1374 | 1374 | ||
1375 | /* No Req or Unacquired Channel or DMAC */ | ||
1376 | if (!desc || !thrd || thrd->free) | ||
1377 | return -EINVAL; | ||
1378 | |||
1379 | regs = thrd->dmac->base; | 1375 | regs = thrd->dmac->base; |
1380 | 1376 | ||
1381 | if (pl330->state == DYING | 1377 | if (pl330->state == DYING |