Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1279868

[RFC v02 01/15] dmaengine: core: Allow NULL mask pointer in __dma_device_satisfies_mask()

From Peter Ujfalusi <peter.ujfalusi@ti.com>
Newsgroups linux.kernel
Subject [RFC v02 01/15] dmaengine: core: Allow NULL mask pointer in __dma_device_satisfies_mask()
Date 2015-11-30 14:50 +0100
Message-ID <qAx06-4hY-7@gated-at.bofh.it> (permalink)
References <qAx05-4hY-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Treat as true condition the case when the mask is NULL.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/dma/dmaengine.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index daf54a39bcc7..52c3eee48e2e 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -184,6 +184,9 @@ __dma_device_satisfies_mask(struct dma_device *device,
 {
 	dma_cap_mask_t has;
 
+	if (!want)
+		return true;
+
 	bitmap_and(has.bits, want->bits, device->cap_mask.bits,
 		DMA_TX_TYPE_END);
 	return bitmap_equal(want->bits, has.bits, DMA_TX_TYPE_END);
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[RFC v02 01/15] dmaengine: core: Allow NULL mask pointer in __dma_device_satisfies_mask() Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-11-30 14:50 +0100
  Re: [RFC v02 01/15] dmaengine: core: Allow NULL mask pointer in __dma_device_satisfies_mask() Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-11-30 15:40 +0100
    Re: [RFC v02 01/15] dmaengine: core: Allow NULL mask pointer in  __dma_device_satisfies_mask() Peter Ujfalusi <peter.ujfalusi@ti.com> - 2015-12-01 10:50 +0100
      Re: [RFC v02 01/15] dmaengine: core: Allow NULL mask pointer in __dma_device_satisfies_mask() Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-01 14:00 +0100
        Re: [RFC v02 01/15] dmaengine: core: Allow NULL mask pointer in  __dma_device_satisfies_mask() Vinod Koul <vinod.koul@intel.com> - 2015-12-01 18:10 +0100

csiph-web