hal: fix unsigned int overflow
Fix unsigned int overflow. CRs-Fixed: 2541532 Change-Id: I4b9448ee99c9160a233fdc8b156be228ceb91f60
This commit is contained in:
parent
15fa15d8ac
commit
72197256b8
|
@ -3044,10 +3044,11 @@ int start_input_stream(struct stream_in *in)
|
|||
pcm_close(in->pcm);
|
||||
in->pcm = NULL;
|
||||
}
|
||||
if (pcm_open_retry_count-- == 0) {
|
||||
if (pcm_open_retry_count == 0) {
|
||||
ret = -EIO;
|
||||
goto error_open;
|
||||
}
|
||||
pcm_open_retry_count--;
|
||||
usleep(PROXY_OPEN_WAIT_TIME * 1000);
|
||||
continue;
|
||||
}
|
||||
|
@ -3536,9 +3537,10 @@ struct pcm* pcm_open_prepare_helper(unsigned int snd_card, unsigned int pcm_devi
|
|||
pcm_close(pcm);
|
||||
pcm = NULL;
|
||||
}
|
||||
if (pcm_open_retry_count-- == 0)
|
||||
if (pcm_open_retry_count == 0)
|
||||
return NULL;
|
||||
|
||||
pcm_open_retry_count--;
|
||||
usleep(PROXY_OPEN_WAIT_TIME * 1000);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue