[PATCH] drm/vboxvideo: Avoid double check buffer_overflow in vbva_write()

2019-04-08 Thread Sidong Yang
In vbva_write(), We do not need to double check available chunk size if chunk is smaller than available buffer. Put the second if clause in the first if clause and avoid check twice. Signed-off-by: Sidong Yang --- drivers/gpu/drm/vboxvideo/vbva_base.c | 14 +++--- 1 file changed, 7 inser

Re: [PATCH] drm/vboxvideo: Avoid double check buffer_overflow in vbva_write()

2019-04-06 Thread Hans de Goede
Hi, On 06-04-19 10:18, Sidong Yang wrote: In vbva_write(), We do not need to double check available chunk size if chunk is smaller than available buffer. Put the second if clause in the first if clause and avoid check twice. Signed-off-by: Sidong Yang The code pattern of checking some condit