[alsa-devel] [PATCH 03/12] fireworks: Fix wrong value as argument for PTR_ERR()
Takashi Sakamoto
o-takashi at sakamocchi.jp
Tue May 27 17:14:38 CEST 2014
The return value of memdup_user() should be passed to return correct error.
Signed-off-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>
---
sound/firewire/fireworks/fireworks_hwdep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/firewire/fireworks/fireworks_hwdep.c b/sound/firewire/fireworks/fireworks_hwdep.c
index 6b50a67..4f8216f 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);
--
1.8.3.2
More information about the Alsa-devel
mailing list