qcacmn: Check client count below HIF_RTPM_ID_MAX

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
This commit is contained in:
Ananya Gupta
2022-06-17 15:04:04 +05:30
committed by Madan Koyyalamudi
부모 5e7510f34a
커밋 025b889ef6
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제

파일 보기

@@ -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;
}