[PATCH 1/1] staging: nvec: check return value

2019-12-17 Thread Xidong Wang
In nvec_kbd_probe(), the return value of devm_input_allocate_device() should be checked before it is used. Signed-off-by: Xidong Wang --- drivers/staging/nvec/nvec_kbd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/nvec/nvec_kbd.c b/drivers/staging/nvec/nvec_kbd.c index

[PATCH 1/1] taging: fbtft: fix memory leak

2018-04-03 Thread Xidong Wang
From: Xidong Wang <2711406...@qq.com> In function fbtft_framebuffer_alloc(), the memory allocated by framebuffer_alloc() is not released on the error path that txbuflen > 0 and txbuf, which holds the return value of devm_kzalloc(), is NULL. This will result in a memory leak bug. Sign

[PATCH 1/1] taging: fbtft: fix memory leak

2018-04-03 Thread Xidong Wang
From: Xidong Wang <2711406...@qq.com> In function fbtft_framebuffer_alloc(), the memory allocated by framebuffer_alloc() is not released on the error path that txbuflen > 0 and txbuf, which holds the return value of devm_kzalloc(), is NULL. This will result in a memory leak bug. Sign