linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] usb: musb: ux500_dma: fix potential NULL dereference error
@ 2013-12-13 10:47 Lee Jones
  2013-12-16 12:14 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Lee Jones @ 2013-12-13 10:47 UTC (permalink / raw)
  To: linux-arm-kernel

static checker warning: "drivers/usb/musb/ux500_dma.c:335
ux500_dma_controller_start()
         error: potential NULL dereference 'param_array'."

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/musb/ux500_dma.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/musb/ux500_dma.c b/drivers/usb/musb/ux500_dma.c
index 3700e97..9aad00f 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",
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 1/1] usb: musb: ux500_dma: fix potential NULL dereference error
  2013-12-13 10:47 [PATCH 1/1] usb: musb: ux500_dma: fix potential NULL dereference error Lee Jones
@ 2013-12-16 12:14 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2013-12-16 12:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 13, 2013 at 11:47 AM, Lee Jones <lee.jones@linaro.org> wrote:

> static checker warning: "drivers/usb/musb/ux500_dma.c:335
> ux500_dma_controller_start()
>          error: potential NULL dereference 'param_array'."
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-16 12:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-13 10:47 [PATCH 1/1] usb: musb: ux500_dma: fix potential NULL dereference error Lee Jones
2013-12-16 12:14 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).