fix return code in error case.

The other failure returns in this function are negative, so make
this one do the same.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
Dave Jones 2006-10-18 00:26:39 -04:00 committed by Dave Airlie
parent 958de71b1a
commit 0d960d26c4

View File

@ -994,7 +994,7 @@ int savage_bci_cmdbuf(DRM_IOCTL_ARGS)
if (cmdbuf.size) { if (cmdbuf.size) {
kcmd_addr = drm_alloc(cmdbuf.size * 8, DRM_MEM_DRIVER); kcmd_addr = drm_alloc(cmdbuf.size * 8, DRM_MEM_DRIVER);
if (kcmd_addr == NULL) if (kcmd_addr == NULL)
return ENOMEM; return DRM_ERR(ENOMEM);
if (DRM_COPY_FROM_USER(kcmd_addr, cmdbuf.cmd_addr, if (DRM_COPY_FROM_USER(kcmd_addr, cmdbuf.cmd_addr,
cmdbuf.size * 8)) cmdbuf.size * 8))