]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8723bs: tidy up error handling
authorYihao Han <hanyihao@vivo.com>
Fri, 8 Apr 2022 14:44:40 +0000 (07:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2022 13:46:50 +0000 (15:46 +0200)
commit9613c5b9a8a1ce41340a955602592890abb6358d
tree700ddf1b0eaef61925c881c58ed13568245dd51f
parentf0f6f6fc01dc30eae8139c09fc426df2fc7174ac
staging: rtl8723bs: tidy up error handling

The check for if rtw_skb_alloc() fails is done twice and is written
in a confusing way.  Move the "if (!recvbuf->pskb)" right after
the allocation.  The "if (recvbuf->pskb)" check can now be deleted
and the code pulled in one tab.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yihao Han <hanyihao@vivo.com>
Link: https://lore.kernel.org/r/20220408144442.17611-1-hanyihao@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/sdio_ops.c