[PATCH] usb: chipidea: udc: improve error handling on ep_queue and f_midi

2015-09-18 Thread eu
From: "Felipe F. Tonello" _ep_queue() didn't check for errors when using add_td_to_list() which can fail if dma_pool_alloc fails, thus causing a kernel panic when lastnode->ptr is NULL. Also f_midi is not checking weather the is an error on usb_ep_queue request, ignoring potential problems, such

[PATCH 1/2] usb: chipidea: udc: improve error handling on ep_queue

2015-09-18 Thread eu
From: "Felipe F. Tonello" _ep_queue() didn't check for errors when using add_td_to_list() which can fail if dma_pool_alloc fails, thus causing a kernel panic when lastnode->ptr is NULL. Signed-off-by: Felipe F. Tonello --- drivers/usb/chipidea/udc.c | 26 +++--- 1 file chan

[PATCH 2/2] usb: gadget: f_midi: check for error on usb_ep_queue

2015-09-18 Thread eu
From: "Felipe F. Tonello" f_midi is not checking weather the is an error on usb_ep_queue request, ignoring potential problems, such as memory leaks. Signed-off-by: Felipe F. Tonello --- drivers/usb/gadget/function/f_midi.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff

[PATCH 0/2] improve error handling on chipidea/udc.c and f_midi.c

2015-09-18 Thread eu
From: "Felipe F. Tonello" Felipe F. Tonello (2): usb: chipidea: udc: improve error handling on ep_queue usb: gadget: f_midi: check for error on usb_ep_queue drivers/usb/chipidea/udc.c | 26 +++--- drivers/usb/gadget/function/f_midi.c | 10 -- 2 files ch

[PATCH 2/3] usb: chipidea: udc: improve error handling on ep_queue

2015-09-18 Thread eu
From: "Felipe F. Tonello" _ep_queue() didn't check for errors when using add_td_to_list() which can fail if dma_pool_alloc fails, thus causing a kernel panic when lastnode->ptr is NULL. Signed-off-by: Felipe F. Tonello --- Changes for v2: - Use separate patch for cleanups. drivers/usb/chip

[PATCH 1/3] usb: chipidea: udc: _ep_queue and _hw_queue cleanup

2015-09-18 Thread eu
From: "Felipe F. Tonello" Update comments to reflect current state of functions. Signed-off-by: Felipe F. Tonello --- Changes for v2: - Introduced this patch. drivers/usb/chipidea/udc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b

[PATCH 3/3] usb: gadget: f_midi: check for error on usb_ep_queue

2015-09-18 Thread eu
From: "Felipe F. Tonello" f_midi is not checking weather the is an error on usb_ep_queue request, ignoring potential problems, such as memory leaks. Signed-off-by: Felipe F. Tonello --- Changes for v2: - Update code style. drivers/usb/gadget/function/f_midi.c | 12 +--- 1 file chan

[PATCH 3/3] usb: gadget: f_midi: check for error on usb_ep_queue

2015-09-18 Thread eu
From: "Felipe F. Tonello" f_midi is not checking whether there is an error on usb_ep_queue request, ignoring potential problems, such as memory leaks. Signed-off-by: Felipe F. Tonello --- Changes for v2: - Update code style. Changes for v3: - Use ip_ep instead of out_ep. Fixed typo in com