diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-12-13 10:47:28 +0000 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-12-17 13:17:42 -0600 |
commit | 086ed9a0bcca0201301b74a0c5160c04f2f38f8b (patch) | |
tree | b13c5a8c3dbe7021330d92f732bc862b709fc0be /drivers/usb/musb | |
parent | 5056ee83e8e9b3b3eec895f8bb0804a802fb61d2 (diff) |
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 <linus.walleij@linaro.org>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/ux500_dma.c | 4 |
1 files changed, 3 insertions, 1 deletions
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", |