mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacmn: Initialize ret in send_pdev_utf_cmd_tlv
If param->len was 0, ret would be returned without being initialized. param->len of 0 is unexpected, so return an error. Change-Id: Ib9b0a60976dedcf8fcd4184083a9948892791621 CRs-Fixed: 1072077
This commit is contained in:
parent
55fcf5a1c8
commit
e007aed7cd
3 changed files with 6 additions and 5 deletions
|
|
@ -171,7 +171,7 @@ void wmi_buf_free(wmi_buf_t net_buf);
|
|||
* @param cmd_id : WMI cmd id
|
||||
* @return 0 on success and -ve on failure.
|
||||
*/
|
||||
int
|
||||
QDF_STATUS
|
||||
wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t buflen,
|
||||
uint32_t cmd_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -1719,8 +1719,8 @@ static bool wmi_is_pm_resume_cmd(uint32_t cmd_id)
|
|||
*
|
||||
* Return: 0 on success
|
||||
*/
|
||||
int wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t len,
|
||||
uint32_t cmd_id)
|
||||
QDF_STATUS wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf,
|
||||
uint32_t len, uint32_t cmd_id)
|
||||
{
|
||||
HTC_PACKET *pkt;
|
||||
A_STATUS status;
|
||||
|
|
@ -1739,7 +1739,7 @@ int wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t len,
|
|||
if (wmi_handle->wmi_stopinprogress) {
|
||||
QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_ERROR,
|
||||
"WMI stop in progress\n");
|
||||
return -EINVAL;
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
#ifndef WMI_NON_TLV_SUPPORT
|
||||
|
|
|
|||
|
|
@ -777,7 +777,8 @@ send_pdev_utf_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
{
|
||||
wmi_buf_t buf;
|
||||
uint8_t *cmd;
|
||||
QDF_STATUS ret;
|
||||
/* if param->len is 0 no data is sent, return error */
|
||||
QDF_STATUS ret = QDF_STATUS_E_INVAL;
|
||||
static uint8_t msgref = 1;
|
||||
uint8_t segNumber = 0, segInfo, numSegments;
|
||||
uint16_t chunk_len, total_bytes;
|
||||
|
|
|
|||
Loading…
Reference in a new issue