From: Lee Jones Date: Fri, 13 Dec 2013 10:47:28 +0000 (+0000) Subject: usb: musb: ux500_dma: fix potential NULL dereference error X-Git-Tag: v3.14-rc1~148^2~90^2~42 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=086ed9a0bcca0201301b74a0c5160c04f2f38f8b;p=linux.git usb: musb: ux500_dma: fix potential NULL dereference error static checker warning: "drivers/usb/musb/ux500_dma.c:335 ux500_dma_controller_start() error: potential NULL dereference 'param_array'." Acked-by: Linus Walleij Reported-by: Dan Carpenter Signed-off-by: Lee Jones Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/musb/ux500_dma.c b/drivers/usb/musb/ux500_dma.c index 3700e9713258..9aad00f11bd5 100644 --- a/drivers/usb/musb/ux500_dma.c +++ b/drivers/usb/musb/ux500_dma.c @@ -336,7 +336,9 @@ static int ux500_dma_controller_start(struct ux500_dma_controller *controller) data ? data->dma_filter : NULL, - param_array[ch_num]); + param_array ? + param_array[ch_num] : + NULL); if (!ux500_channel->dma_chan) { ERR("Dma pipe allocation error dir=%d ch=%d\n",