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 <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
51212eea4f
commit
ba06b2cbad
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user