summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jesse.barnes@intel.com>2007-11-16 13:57:42 -0800
committerJesse Barnes <jesse.barnes@intel.com>2007-11-16 13:57:42 -0800
commit96e136c4794f9f57e18c1f984a27bbad4b5e1500 (patch)
treecbc11c2161bf104e01d890a1ede6a10e0996c23b
parent7ec4ebe95e7eec6625d68ae6300255901b69d5c7 (diff)
Fix typo in copy_to_user calls
We want to copy to card_res->modes + copied, not &card_res->modes + copied.
-rw-r--r--linux-core/drm_crtc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c
index db062c1d..df934841 100644
--- a/linux-core/drm_crtc.c
+++ b/linux-core/drm_crtc.c
@@ -1209,8 +1209,7 @@ int drm_mode_getresources(struct drm_device *dev,
list_for_each_entry(output, &dev->mode_config.output_list,
head) {
DRM_DEBUG("OUTPUT ID is %d\n", output->id);
- if (put_user(output->id,
- card_res->output_id + copied))
+ if (put_user(output->id, card_res->output_id + copied))
return -EFAULT;
copied++;
}
@@ -1224,7 +1223,7 @@ int drm_mode_getresources(struct drm_device *dev,
head) {
list_for_each_entry(mode, &output->modes, head) {
drm_crtc_convert_to_umode(&u_mode, mode);
- if (copy_to_user(&card_res->modes + copied,
+ if (copy_to_user(card_res->modes + copied,
&u_mode, sizeof(u_mode)))
return -EFAULT;
copied++;
@@ -1233,9 +1232,9 @@ int drm_mode_getresources(struct drm_device *dev,
/* add in user modes */
list_for_each_entry(mode, &dev->mode_config.usermode_list, head) {
drm_crtc_convert_to_umode(&u_mode, mode);
- if (copy_to_user(&card_res->modes + copied, &u_mode,
+ if (copy_to_user(card_res->modes + copied, &u_mode,
sizeof(u_mode)))
- return -EFAULT;
+ return -EFAULT;
copied++;
}
}