diff options
author | Amarnath Hullur Subramanyam <amarnath@codeaurora.org> | 2015-06-24 20:11:45 +0530 |
---|---|---|
committer | Vineeta Srivastava <vsrivastava@google.com> | 2015-07-09 11:59:08 -0700 |
commit | 652bd1a487e5f18113c08eaa796e5f3229f8df61 (patch) | |
tree | 48604e567d9ee907f394e398d07676240e94952c | |
parent | 44273e6b215d69148af9f2cfab11c5eae9dcd233 (diff) | |
download | wlan-652bd1a487e5f18113c08eaa796e5f3229f8df61.tar.gz |
WiFi-HAL: Remove returning unnecessary error codes
There is no need of returning error code if the ring buffer write
fails because the ring buffer is not enabled yet. Hence donot
return error codes in these cases.
Change-Id: I8518f341c0057b24cf97e8d63592cb8b034422c4
-rw-r--r-- | qcwcn/wifi_hal/wifilogger_diag.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/qcwcn/wifi_hal/wifilogger_diag.cpp b/qcwcn/wifi_hal/wifilogger_diag.cpp index a666ff2..ae51267 100644 --- a/qcwcn/wifi_hal/wifilogger_diag.cpp +++ b/qcwcn/wifi_hal/wifilogger_diag.cpp @@ -102,8 +102,6 @@ static wifi_error update_connectivity_ring_buf(hal_info *info, info->on_ring_buffer_data) { return ring_buffer_write(&info->rb_infos[CONNECTIVITY_EVENTS_RB_ID], (u8*)rbe, total_length, 1); - } else { - return WIFI_ERROR_NOT_AVAILABLE; } return WIFI_SUCCESS; @@ -686,8 +684,6 @@ wifi_error process_firmware_prints(hal_info *info, u8 *buf, u16 length) ALOGE("Failed to write firmware prints rb payload %d", status); return status; } - } else { - return WIFI_ERROR_NOT_AVAILABLE; } return WIFI_SUCCESS; @@ -978,7 +974,7 @@ static wifi_error process_wakelock_event(hal_info *info, u8* buf, int length) (u8*)pRingBufferEntry, len_ring_buffer_entry, 1); } else { - status = WIFI_ERROR_NOT_AVAILABLE; + status = WIFI_SUCCESS; } if ((u8 *)pRingBufferEntry != wl_ring_buffer) { @@ -1028,8 +1024,6 @@ static wifi_error update_stats_to_ring_buf(hal_info *info, (u8*)pRingBufferEntry, size, num_records); - } else { - return WIFI_ERROR_NOT_AVAILABLE; } return WIFI_SUCCESS; @@ -1487,17 +1481,15 @@ wifi_error process_driver_prints(hal_info *info, u8 *buf, u16 length) (u8*)&rb_entry_hdr, sizeof(wifi_ring_buffer_entry), 0); if (status != WIFI_SUCCESS) { - ALOGE("Failed to write kernel prints rb header %d", status); + ALOGE("Failed to write driver prints rb header %d", status); return status; } status = ring_buffer_write(&info->rb_infos[DRIVER_PRINTS_RB_ID], buf, length, 1); if (status != WIFI_SUCCESS) { - ALOGE("Failed to write kernel prints rb payload %d", status); + ALOGE("Failed to write driver prints rb payload %d", status); return status; } - } else { - return WIFI_ERROR_NOT_AVAILABLE; } return WIFI_SUCCESS; |