From: Takashi Sakamoto Date: Tue, 27 May 2014 15:14:38 +0000 (+0900) Subject: ALSA: fireworks: Fix wrong value as argument for PTR_ERR() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ba06b2cbad2b97ee107667ab511f40b9be4f6846;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ALSA: fireworks: Fix wrong value as argument for PTR_ERR() The return value of memdup_user() should be passed to return correct error. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- diff --git a/sound/firewire/fireworks/fireworks_hwdep.c b/sound/firewire/fireworks/fireworks_hwdep.c index 6b50a6796d22..4f8216fb6b62 100644 --- a/sound/firewire/fireworks/fireworks_hwdep.c +++ b/sound/firewire/fireworks/fireworks_hwdep.c @@ -135,7 +135,7 @@ hwdep_write(struct snd_hwdep *hwdep, const char __user *data, long count, buf = memdup_user(data, count); if (IS_ERR(buf)) - return PTR_ERR(data); + return PTR_ERR(buf); /* check seqnum is not for kernel-land */ seqnum = be32_to_cpu(((struct snd_efw_transaction *)buf)->seqnum);