提交 ea3336ac 编写于 作者: P Prameela Rani Garnepudi 提交者: Kalle Valo

rsi: Handle usb multi-byte write failure case properly

In function usb_write_register_multiple, if any intermediate block transfer
is failed, further operations should be terminated. 'else' is removed, as
there is no significance for it after return.
Signed-off-by: NPrameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: NAmitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 4b1fc881
......@@ -316,11 +316,12 @@ int rsi_usb_write_register_multiple(struct rsi_hw *adapter,
rsi_dbg(ERR_ZONE,
"Reg write failed with error code :%d\n",
status);
} else {
count -= transfer;
data += transfer;
addr += transfer;
kfree(buf);
return status;
}
count -= transfer;
data += transfer;
addr += transfer;
}
kfree(buf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册