mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
staging: rtl8723bs: remove redundant rsp_allocated_buf
The original code allocated extra memory and manually aligned the rsp_buf pointer to a 4-byte boundary, however kzalloc() guarantees a minimum of 8-byte alignment so this was unnecessary. Also, because the pointer was shifted, the original pointer had to be stored in rsp_allocated_buf just so it could be passed to kfree() later. Remove the redundant alignment math, remove the extra 4 bytes of padding from kzalloc() call, and assign memory directly to rsp_buf. This allows us to remove the rsp_allocated_buf variable from cmd_priv struct. Suggested-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Devansh Soni <devanshsoni874@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Link: https://patch.msgid.link/20260617123853.63022-1-devanshsoni874@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b1dfea3cf9
commit
a9a79ae0b2
2 changed files with 3 additions and 7 deletions
Loading…
Add table
Add a link
Reference in a new issue