aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/serial.c')
-rw-r--r--drivers/usb/gadget/serial.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index 2af3f785d5a1..f1762ed6db63 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -2312,9 +2312,8 @@ static struct gs_buf *gs_buf_alloc(unsigned int size, int kmalloc_flags)
2312 */ 2312 */
2313void gs_buf_free(struct gs_buf *gb) 2313void gs_buf_free(struct gs_buf *gb)
2314{ 2314{
2315 if (gb != NULL) { 2315 if (gb) {
2316 if (gb->buf_buf != NULL) 2316 kfree(gb->buf_buf);
2317 kfree(gb->buf_buf);
2318 kfree(gb); 2317 kfree(gb);
2319 } 2318 }
2320} 2319}