diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-08-16 11:54:07 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-09-22 05:32:33 +1000 |
commit | c7aed1790254aed286b7bfb51167c2676df86f4b (patch) | |
tree | a33b073fb62cb18cf6184da8c2f7d2e7f94533ae /drivers/char/drm/i830_dma.c | |
parent | 0a0c721dc5d0de011e5d363cd454c60c66ca00ec (diff) | |
download | op-kernel-dev-c7aed1790254aed286b7bfb51167c2676df86f4b.zip op-kernel-dev-c7aed1790254aed286b7bfb51167c2676df86f4b.tar.gz |
drm: i810_dma.c: fix pointer arithmetic for 64-bit target
First warning result from open-coded PTR_ERR,
the rest is caused by code like this:
*(u32 *) ((u32) buf_priv->kernel_virtual + used)
I've also fixed a missing PTR_ERR in i830_dma.c
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/i830_dma.c')
-rw-r--r-- | drivers/char/drm/i830_dma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/drm/i830_dma.c b/drivers/char/drm/i830_dma.c index 2cf3cc5..4f0e574 100644 --- a/drivers/char/drm/i830_dma.c +++ b/drivers/char/drm/i830_dma.c @@ -146,7 +146,7 @@ static int i830_map_buffer(drm_buf_t * buf, struct file *filp) if (IS_ERR((void *)virtual)) { /* ugh */ /* Real error */ DRM_ERROR("mmap error\n"); - retcode = virtual; + retcode = PTR_ERR((void *)virtual); buf_priv->virtual = NULL; } else { buf_priv->virtual = (void __user *)virtual; |