On Fri, Oct 23, 2020 at 03:03:17AM -0700, Elena Afanasova wrote:
> - txb = kmalloc(sizeof(struct rtllib_txb) + (sizeof(u8 *) * nr_frags),
> - gfp_mask);
> + txb = kzalloc(sizeof(*txb) + (sizeof(u8 *) * nr_frags), gfp_mask);
This would be a good opportunity to use struct_s
On Fri, 23 Oct 2020, Elena Afanasova wrote:
> kmalloc() and memset() calls can be replaced with kzalloc().
It would be nice to say why the change is correct.
julia
> Found with Coccinelle.
>
> Signed-off-by: Elena Afanasova
> ---
> drivers/staging/rtl8192e/rtllib_tx.c | 4 +---
> 1 file ch
kmalloc() and memset() calls can be replaced with kzalloc().
Found with Coccinelle.
Signed-off-by: Elena Afanasova
---
drivers/staging/rtl8192e/rtllib_tx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c
b/drivers/staging/rtl8192e/rtll