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:
Devansh Soni 2026-06-17 18:08:53 +05:30 • committed by Greg Kroah-Hartman
commit a9a79ae0b2
2 changed files with 3 additions and 7 deletions