ALSA: hdsp: fix a test for copy_to_user() failure
[linux-2.6-microblaze.git] / sound / pci / rme9652 / hdsp.c
index e3e4fab..8457a4b 100644 (file)
@@ -4877,9 +4877,8 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne
                memset(&hdsp_version, 0, sizeof(hdsp_version));
                hdsp_version.io_type = hdsp->io_type;
                hdsp_version.firmware_rev = hdsp->firmware_rev;
-               err = copy_to_user(argp, &hdsp_version, sizeof(hdsp_version));
-               if (err < 0)
-                       return -EFAULT;
+               if (copy_to_user(argp, &hdsp_version, sizeof(hdsp_version)))
+                       return -EFAULT;
                break;
        }
        case SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE: {