Error result was not handled properly for snd_pcm_avail() function in the ALSA driver.