]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
Merge tag 'amd-drm-next-6.5-2023-06-09' of https://gitlab.freedesktop.org/agd5f/linux...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_debugfs.c
index c657bed350accc69ff6ebae9d52a012ad929119e..56e89e76ff179a6eaa83c412e270328c0e143fb1 100644 (file)
@@ -478,15 +478,16 @@ done:
 static long amdgpu_debugfs_gprwave_ioctl(struct file *f, unsigned int cmd, unsigned long data)
 {
        struct amdgpu_debugfs_gprwave_data *rd = f->private_data;
-       int r;
+       int r = 0;
 
        mutex_lock(&rd->lock);
 
        switch (cmd) {
        case AMDGPU_DEBUGFS_GPRWAVE_IOC_SET_STATE:
-               r = copy_from_user(&rd->id, (struct amdgpu_debugfs_gprwave_iocdata *)data, sizeof rd->id);
-               if (r)
-                       return r ? -EINVAL : 0;
+               if (copy_from_user(&rd->id,
+                                  (struct amdgpu_debugfs_gprwave_iocdata *)data,
+                                  sizeof(rd->id)))
+                       r = -EFAULT;
                goto done;
        default:
                r = -EINVAL;
This page took 0.035615 seconds and 4 git commands to generate.