mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 00:51:44 +00:00
rsi: fix error return code in rsi_reset_card()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 17ff2c794f
("rsi: reset device changes for 9116")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1605582454-39649-1-git-send-email-zhangchangzhong@huawei.com
This commit is contained in:
parent
01c195de62
commit
fb21d14694
@ -743,24 +743,24 @@ static int rsi_reset_card(struct rsi_hw *adapter)
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
} else {
|
||||
if ((rsi_usb_master_reg_write(adapter,
|
||||
NWP_WWD_INTERRUPT_TIMER,
|
||||
NWP_WWD_INT_TIMER_CLKS,
|
||||
RSI_9116_REG_SIZE)) < 0) {
|
||||
ret = rsi_usb_master_reg_write(adapter,
|
||||
NWP_WWD_INTERRUPT_TIMER,
|
||||
NWP_WWD_INT_TIMER_CLKS,
|
||||
RSI_9116_REG_SIZE);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
}
|
||||
if ((rsi_usb_master_reg_write(adapter,
|
||||
NWP_WWD_SYSTEM_RESET_TIMER,
|
||||
NWP_WWD_SYS_RESET_TIMER_CLKS,
|
||||
RSI_9116_REG_SIZE)) < 0) {
|
||||
ret = rsi_usb_master_reg_write(adapter,
|
||||
NWP_WWD_SYSTEM_RESET_TIMER,
|
||||
NWP_WWD_SYS_RESET_TIMER_CLKS,
|
||||
RSI_9116_REG_SIZE);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
}
|
||||
if ((rsi_usb_master_reg_write(adapter,
|
||||
NWP_WWD_MODE_AND_RSTART,
|
||||
NWP_WWD_TIMER_DISABLE,
|
||||
RSI_9116_REG_SIZE)) < 0) {
|
||||
ret = rsi_usb_master_reg_write(adapter,
|
||||
NWP_WWD_MODE_AND_RSTART,
|
||||
NWP_WWD_TIMER_DISABLE,
|
||||
RSI_9116_REG_SIZE);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
|
||||
rsi_dbg(INFO_ZONE, "Reset card done\n");
|
||||
|
Loading…
Reference in New Issue
Block a user