dmaengine: usb-dmac: Fix dereferencing freed memory 'desc'

This patch fixes an issue that the usb_dmac_desc_free() is
dereferencing freed memory 'desc' because it uses list_for_each_entry().
This function should use list_for_each_entry_safe().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
Yoshihiro Shimoda 2015-04-03 20:20:15 +09:00 • committed by Vinod Koul
commit d7d8e892aa