OSDN Git Service

Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
[uclinux-h8/linux.git] / drivers / usb / gadget / udc / bdc / bdc_ep.c
index d1b8153..d619950 100644 (file)
@@ -159,8 +159,10 @@ static int ep_bd_list_alloc(struct bdc_ep *ep)
                bd_table->start_bd = dma_pool_alloc(bdc->bd_table_pool,
                                                        GFP_ATOMIC,
                                                        &dma);
-               if (!bd_table->start_bd)
+               if (!bd_table->start_bd) {
+                       kfree(bd_table);
                        goto fail;
+               }
 
                bd_table->dma = dma;