]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: mv_xor_v2: handle mv_xor_v2_prep_sw_desc() error properly
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fri, 5 May 2017 09:57:44 +0000 (11:57 +0200)
committerVinod Koul <vinod.koul@intel.com>
Sun, 14 May 2017 12:52:08 +0000 (18:22 +0530)
commit2eb8899fdb7407095fddef9ac702ce5c14f208fc
treecea4e75fd4682017869076d94ec57b4832be91da
parent6a0fa58cdd92da9a8e6fa4e621cabd91974091b3
dmaengine: mv_xor_v2: handle mv_xor_v2_prep_sw_desc() error properly

The mv_xor_v2_prep_sw_desc() is called from a few different places in
the driver, but we never take into account the fact that it might
return NULL. This commit fixes that, ensuring that we don't panic if
there are no more descriptors available.

Fixes: 3b017a380a25 ("dmaengine: mv_xor_v2: new driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/mv_xor_v2.c