--- zzzz-none-000/linux-3.10.107/sound/pci/emu10k1/io.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/pci/emu10k1/io.c 2021-02-04 17:41:59.000000000 +0000 @@ -71,11 +71,8 @@ unsigned long flags; unsigned int mask; - if (!emu) { - snd_printk(KERN_ERR "ptr_write: emu is null!\n"); - dump_stack(); + if (snd_BUG_ON(!emu)) return; - } mask = emu->audigy ? A_PTR_ADDRESS_MASK : PTR_ADDRESS_MASK; regptr = ((reg << 16) & mask) | (chn & PTR_CHANNELNUM_MASK); @@ -199,7 +196,7 @@ int err = 0; if ((reg > 0x7f) || (value > 0x1ff)) { - snd_printk(KERN_ERR "i2c_write: invalid values.\n"); + dev_err(emu->card->dev, "i2c_write: invalid values.\n"); return -EINVAL; } @@ -227,7 +224,7 @@ break; if (timeout > 1000) { - snd_printk(KERN_WARNING + dev_warn(emu->card->dev, "emu10k1:I2C:timeout status=0x%x\n", status); break; @@ -239,8 +236,8 @@ } if (retry == 10) { - snd_printk(KERN_ERR "Writing to ADC failed!\n"); - snd_printk(KERN_ERR "status=0x%x, reg=%d, value=%d\n", + dev_err(emu->card->dev, "Writing to ADC failed!\n"); + dev_err(emu->card->dev, "status=0x%x, reg=%d, value=%d\n", status, reg, value); /* dump_stack(); */ err = -EINVAL;