ALSA: snd-hda-intel - add checks for invalid values to *query_supported_pcm()
ALSA: snd-hda-intel - add checks for invalid values to *query_supported_pcm()

If ratesp or formatsp values are zero, wrong values are passed to ALSA's
the PCM midlevel code. The bug is showed more later than expected.

Also, clean a bit the code.

Signed-off-by: Jaroslav Kysela <72edd5e1a572f82f059ccbb83c92b74d6cb051ff@perex.cz>
Signed-off-by: Takashi Iwai <4596b3305151c7ee743192a95d394341e3d3b644@suse.de>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs