While registering a client, HIF_RTPM_ID_MAX is also being checked for registering. Fix is to exclude HIF_RTPM_ID_MAX id. Change-Id: I57e572abc22a27586cf350af423293a8b455af1c CRs-Fixed: 3223394
@@ -568,7 +568,7 @@ void hif_cleanup_static_buf_to_target(struct hif_softc *scn);
void hif_runtime_prevent_linkdown(struct hif_softc *scn, bool is_get);
#else
static inline
-void hif_runtime_prevent_linkdown(struct hif_softc * scn, bool is_get)
+void hif_runtime_prevent_linkdown(struct hif_softc *scn, bool is_get)
{
}
#endif
@@ -418,7 +418,7 @@ QDF_STATUS hif_rtpm_register(uint32_t id, void (*hif_rtpm_cbk)(void))
return QDF_STATUS_E_FAILURE;
- if (id > HIF_RTPM_ID_MAX || gp_hif_rtpm_ctx->clients[id]) {
+ if (id >= HIF_RTPM_ID_MAX || gp_hif_rtpm_ctx->clients[id]) {
hif_err("Invalid client %d", id);
return QDF_STATUS_E_INVAL;