mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-14 05:55:17 +00:00
staging: rtl8188eu: refactor rtw_lps_ctrl_wk_cmd
Allocate memory only if we're asked to enqueue the command for later processing. Handle memory allocation failures in one place. There's no need to "goto exit" if we're not doing any cleanup there. kzalloc already set all of pdrvextra_cmd_parm to 0. We don't have to set pdrvextra_cmd_parm->pbuf = NULL manually. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210605165858.3175-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b17aad8b56
commit
d3f3fb9810
1 changed files with 16 additions and 27 deletions
Loading…
Add table
Add a link
Reference in a new issue