]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - sound/usb/line6/driver.c
ALSA: line6: fix a crash in line6_hwdep_write()
[karo-tx-linux.git] / sound / usb / line6 / driver.c
index 14e587e706554b4e07fc4eb42dfd55a14808a572..90009c0b3a92e42f2598e05b451a0cbc0d79c8bf 100644 (file)
@@ -604,8 +604,8 @@ line6_hwdep_write(struct snd_hwdep *hwdep, const char __user *data, long count,
        }
 
        data_copy = memdup_user(data, count);
-       if (IS_ERR(ERR_PTR))
-               return -ENOMEM;
+       if (IS_ERR(data_copy))
+               return PTR_ERR(data_copy);
 
        rv = line6_send_raw_message(line6, data_copy, count);