On 04/06/2016 09:37 PM, Dan Carpenter wrote:
Hello Jarkko Nikula,
The patch ef859312c3a1: "dmaengine: core: Use dev_ functions for
debug and error prints" from Mar 14, 2016, leads to the following
static checker warning:
drivers/dma/dmaengine.c:667 __dma_request_channel()
error: potential NULL dereference 'chan'.
drivers/dma/dmaengine.c
650 struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask,
651 dma_filter_fn fn, void *fn_param)
652 {
653 struct dma_device *device, *_d;
654 struct dma_chan *chan = NULL;
^^^^^^^^^^^
655
656 /* Find a channel */
657 mutex_lock(&dma_list_mutex);
658 list_for_each_entry_safe(device, _d, &dma_device_list, global_node) {
659 chan = find_candidate(device, mask, fn, fn_param);
660 if (!IS_ERR(chan))
661 break;
662
663 chan = NULL;
^^^^^^^^^^^^
664 }
665 mutex_unlock(&dma_list_mutex);
666
667 dev_dbg(chan->device->dev, "%s: %s (%s)\n",
^^^^^^^^^^^^^^^^^
Thanks, obviously blind pr_debug to dev_dbg conversion here... I'll send
a fix.
--
Jarkko
--
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