qcacmn: Fix array out of bound write in scheduler queue registration

Scheduler is directly assigning last incremented queue index without
validating if max number of message queues are already registered.
Add sanity check to make sure after registering max no of message
queues new queue registration request fails gracefully.

Change-Id: I0c608d06e05d25a2f8003630d04a74b6a30802e8
CRs-Fixed: 1102097
1 file changed