From: Jingchang Lu Date: Fri, 21 Feb 2014 06:50:06 +0000 (+0800) Subject: dma: fsl-edma: fix static checker warning of NULL dereference X-Git-Tag: v3.15-rc1~39^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=178c81e58e91559fd2c6b1cae43c8f573a2ead36;p=pandora-kernel.git dma: fsl-edma: fix static checker warning of NULL dereference The static checker reports following warning: drivers/dma/fsl-edma.c:732 fsl_edma_xlate() error: we previously assumed 'chan' could be null (see line 737) The changes of the loop cursor in the iteration may result in NULL dereference when dma_get_slave_channel failed but loop will continue. So use list_for_each_entry_safe() instead of list_for_each_entry() to against this. Reported-by: Dan Carpenter Signed-off-by: Jingchang Lu Signed-off-by: Vinod Koul --- Reading git-diff-tree failed