Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 855372c0 authored by Cong Ding's avatar Cong Ding Committed by Vinod Koul
Browse files

dma: sh/shdma-base.c: remove unnecessary null pointer check



the variable chan is dereferenced in line 635, so it is no reason to check
null again in line 641.

Signed-off-by: default avatarCong Ding <dinggnu@gmail.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent ed30933e
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -638,9 +638,6 @@ static int shdma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
	unsigned long flags;
	int ret;

	if (!chan)
		return -EINVAL;

	switch (cmd) {
	case DMA_TERMINATE_ALL:
		spin_lock_irqsave(&schan->chan_lock, flags);