提交 9a93c260 编写于 作者: S Shaozhengchao 提交者: Yang Yingliang

net/hinic: fix static check problem

driver inclusion
category:bugfix
bugzilla:4472
CVE:NA

-----------------------------------------------------------------------

fix static check problem
Signed-off-by: NShaozhengchao <shaozhengchao@huawei.com>
Reviewed-by: NLuoshaokai <luoshaokai@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 173018ac
......@@ -104,6 +104,7 @@ int hinic_sync_time(void *hwdev, u64 time)
sdk_err(((struct hinic_hwdev *)hwdev)->dev_hdl,
"Failed to sync time to mgmt, err: %d, status: 0x%x, out size: 0x%x\n",
err, time_info.status, out_size);
return -EFAULT;
}
return err;
......
......@@ -1545,10 +1545,8 @@ static int send_to_nic_driver(struct hinic_nic_dev *nic_dev,
}
mutex_unlock(&nic_dev->nic_mutex);
if (index == num_cmds) {
pr_err("Can't find callback for %d\n", cmd_type);
if (index == num_cmds)
return -EINVAL;
}
return err;
}
......@@ -1571,7 +1569,8 @@ static int send_to_hw_driver(void *hwdev, struct msg_module *nt_msg,
break;
}
}
if (index == num_cmds)
return -EINVAL;
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册