dmaengine: shdma: Make channel filter ignore unrelated devices
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 31 Jul 2014 00:34:05 +0000 (09:34 +0900)
committerVinod Koul <vinod.koul@intel.com>
Thu, 31 Jul 2014 11:45:45 +0000 (17:15 +0530)
commitc091ff51b4d2543b828d53ce47f66905dee870fd
tree1354b1abdf40d4f83e0824a51b0be634ddc5a16e
parent9f2c2bb31258e11b1ebaf73bdf2a88f8afaa2dd2
dmaengine: shdma: Make channel filter ignore unrelated devices

The shdma_chan_filter() function relies on the DMA channel being
embedded in an shdma_chan structure. If this assumption isn't true, for
instance when the system contains DMA channels supported by an unrelated
driver, the function will crash.

Avoid this by returning false directly when the channel belongs to an
unrelated device.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/sh/shdma-base.c