diff options
author | Takashi Iwai | 2017-08-22 15:44:45 +0200 |
---|---|---|
committer | Takashi Iwai | 2017-08-22 15:44:45 +0200 |
commit | 241bc82e62b28fdb7223b85180fd814f4963c971 (patch) | |
tree | f0d1a3889fd027e017faa37fc34bffe2fa038c41 /sound/pci | |
parent | 3a93d082bacf887b47737c4b75c083dea7570832 (diff) | |
parent | 88c54cdf61f508ebcf8da2d819f5dfc03e954d1d (diff) |
Merge branch 'for-linus' into for-next
Conflicts:
sound/core/control.c
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/emu10k1/emufx.c | 14 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 1 |
2 files changed, 11 insertions, 4 deletions
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index dc585959ca32..a2b56b188be4 100644 --- a/sound/pci/emu10k1/emufx.c +++ b/sound/pci/emu10k1/emufx.c @@ -698,10 +698,18 @@ static int copy_gctl(struct snd_emu10k1 *emu, { struct snd_emu10k1_fx8010_control_old_gpr __user *octl; - if (emu->support_tlv) - return copy_from_user(gctl, &_gctl[idx], sizeof(*gctl)); + if (emu->support_tlv) { + if (in_kernel) + memcpy(gctl, (void *)&_gctl[idx], sizeof(*gctl)); + else if (copy_from_user(gctl, &_gctl[idx], sizeof(*gctl))) + return -EFAULT; + return 0; + } + octl = (struct snd_emu10k1_fx8010_control_old_gpr __user *)_gctl; - if (copy_from_user(gctl, &octl[idx], sizeof(*octl))) + if (in_kernel) + memcpy(gctl, (void *)&octl[idx], sizeof(*octl)); + else if (copy_from_user(gctl, &octl[idx], sizeof(*octl))) return -EFAULT; gctl->tlv = NULL; return 0; diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index a91a9ef00c40..217bb582aff1 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6647,7 +6647,6 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { SND_HDA_PIN_QUIRK(0x10ec0299, 0x1028, "Dell", ALC269_FIXUP_DELL4_MIC_NO_PRESENCE, ALC225_STANDARD_PINS, {0x12, 0xb7a60130}, - {0x13, 0xb8a61140}, {0x17, 0x90170110}), {} }; |