On Mon, Aug 7, 2017 at 9:39 AM, Dave Jiang <dave.jiang@xxxxxxxxx> wrote: > DMA_MEMSET_SG is missing the verification of having the operation set and > also a supporting function provided. > > Fixes: Commit 50c7cd2bd ("dmaengine: Add scatter-gathered memset") > > Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx> > --- > drivers/dma/dmaengine.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c > index 1c424f6..d9a71f0 100644 > --- a/drivers/dma/dmaengine.c > +++ b/drivers/dma/dmaengine.c > @@ -935,6 +935,8 @@ int dma_async_device_register(struct dma_device *device) > !device->device_prep_dma_pq_val); > BUG_ON(dma_has_cap(DMA_MEMSET, device->cap_mask) && > !device->device_prep_dma_memset); > + BUG_ON(dma_has_cap(DMA_MEMSET_SG, device->cap_mask) && > + !device->device_prep_dma_memset_sg); > BUG_ON(dma_has_cap(DMA_INTERRUPT, device->cap_mask) && > !device->device_prep_dma_interrupt); > BUG_ON(dma_has_cap(DMA_SG_SG, device->cap_mask) && > One of these days we might convert all of these to a WARN_ON_ONCE() with a an error return. No need to crash dmaengine developer systems when they make this small mistake. -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html