Re: [PATCH v2] usb: core: message: remove memset in usb_get_descriptor()

2019-06-29 Thread Greg KH
On Sat, Jun 29, 2019 at 04:40:11PM +0800, yuan linyu wrote: > when below condition occur, the buf will be dirty again. > if (result > 1 && ((u8 *)buf)[1] != type) { > result = -ENODATA; > continue; > } > so caller should check return length which indicate buffer valid or not. I still f

[PATCH v2] usb: core: message: remove memset in usb_get_descriptor()

2019-06-29 Thread yuan linyu
when below condition occur, the buf will be dirty again. if (result > 1 && ((u8 *)buf)[1] != type) { result = -ENODATA; continue; } so caller should check return length which indicate buffer valid or not. Signed-off-by: yuan linyu --- drivers/usb/core/message.c | 2 -- 1 file cha