소스 검색

USB: free memory when writing fails in usb/serial/mos7840.c

Free buffer when writing ZLP_REG5 failed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roel Kluin 17 년 전
부모
커밋
7ced46c3ad
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/usb/serial/mos7840.c

+ 1 - 1
drivers/usb/serial/mos7840.c

@@ -2711,7 +2711,7 @@ static int mos7840_startup(struct usb_serial *serial)
 	status = mos7840_set_reg_sync(serial->port[0], ZLP_REG5, Data);
 	if (status < 0) {
 		dbg("Writing ZLP_REG5 failed status-0x%x\n", status);
-		return -1;
+		goto error;
 	} else
 		dbg("ZLP_REG5 Writing success status%d\n", status);