Skip to content

Commit

Permalink
rtw88: remove unnecessary variable
Browse files Browse the repository at this point in the history
The variable ret is defined at the beginning and initialized
to 0 until the function returns ret, and the variable ret is
not reassigned.Therefore, we do not need to define the variable
ret, just return 0 directly at the end of the function.

Signed-off-by: wengjianfeng <wengjianfeng@yulong.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210223075438.13676-1-samirweng1979@163.com
  • Loading branch information
wengjianfeng authored and Kalle Valo committed Mar 15, 2021
1 parent 5b492c7 commit 4a7ea94
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/realtek/rtw88/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,6 @@ static int rtw_chip_parameter_setup(struct rtw_dev *rtwdev)
struct rtw_chip_info *chip = rtwdev->chip;
struct rtw_hal *hal = &rtwdev->hal;
struct rtw_efuse *efuse = &rtwdev->efuse;
int ret = 0;

switch (rtw_hci_type(rtwdev)) {
case RTW_HCI_TYPE_PCIE:
Expand Down Expand Up @@ -1432,7 +1431,7 @@ static int rtw_chip_parameter_setup(struct rtw_dev *rtwdev)

hal->bfee_sts_cap = 3;

return ret;
return 0;
}

static int rtw_chip_efuse_enable(struct rtw_dev *rtwdev)
Expand Down

0 comments on commit 4a7ea94

Please sign in to comment.