We have a value for SND_DEVICE_NONE so we should use that. There is no
field for SND_DEVICE_MIN so we need to check it is bigger.
Change-Id: I041930c8c4b552d45804a178aeb1aa981ae7c13f
{
const char *name = NULL;
- if (snd_device >= SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX)
+ if (snd_device == SND_DEVICE_NONE ||
+ (snd_device > SND_DEVICE_MIN && snd_device < SND_DEVICE_MAX))
name = device_table[snd_device];
ALOGE_IF(name == NULL, "%s: invalid snd device %d", __func__, snd_device);