drivers/net/i40e/:remove i40e_nvmupd_command redundant code in function i40e_nvmupd_validate_command, when "cmd->data_size < 1" it'll return I40E_NVMUPD_INVALID, and in function "i40e_nvmupd_command" when "upd_cmd == I40E_NVMUPD_STATUS", it check "!cmd->d
Checks
Commit Message
Signed-off-by: Li Han <han.li1@zte.com.cn>
---
drivers/net/i40e/base/i40e_nvm.c | 5 -----
1 file changed, 5 deletions(-)
@@ -869,11 +869,6 @@ enum i40e_status_code i40e_nvmupd_command(struct i40e_hw *hw,
* going into the state machine
*/
if (upd_cmd == I40E_NVMUPD_STATUS) {
- if (!cmd->data_size) {
- *perrno = -EFAULT;
- return I40E_ERR_BUF_TOO_SHORT;
- }
-
bytes[0] = hw->nvmupd_state;
if (cmd->data_size >= 4) {