The newly added sanity-check for a codec verb can be better written
with logical ORs. Also, the parameter can be more than 8bit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
{
u32 val;
- if ((codec->addr & ~0xf) | (direct & ~1) | (nid & ~0x7f) |
- (verb & ~0xfff) | (parm & ~0xff)) {
+ if ((codec->addr & ~0xf) || (direct & ~1) || (nid & ~0x7f) ||
+ (verb & ~0xfff) || (parm & ~0xffff)) {
printk(KERN_ERR "hda-codec: out of range cmd %x:%x:%x:%x:%x\n",
codec->addr, direct, nid, verb, parm);
return ~0;