msm: kgsl: return correct error code for unknown ioctls

Unknown ioctl code errors are supposed to be ENOIOCTLCMD,
not EINVAL.
This commit is contained in:
securecrt 2012-07-25 19:35:35 +08:00
parent 1b6fa28430
commit 543247cd01
2 changed files with 3 additions and 2 deletions

View File

@ -415,6 +415,7 @@ adreno_identify_gpu(struct adreno_device *adreno_dev)
adreno_dev->pm4_fwfile = adreno_gpulist[i].pm4fw;
adreno_dev->istore_size = adreno_gpulist[i].istore_size;
adreno_dev->pix_shader_start = adreno_gpulist[i].pix_shader_start;
adreno_dev->instruction_size = adreno_gpulist[i].instruction_size;
}
static int __devinit
@ -1204,7 +1205,7 @@ static long adreno_ioctl(struct kgsl_device_private *dev_priv,
default:
KGSL_DRV_INFO(dev_priv->device,
"invalid ioctl code %08x\n", cmd);
result = -EINVAL;
result = -ENOIOCTLCMD;
break;
}
return result;

View File

@ -1964,7 +1964,7 @@ static long kgsl_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
if (!func) {
KGSL_DRV_INFO(dev_priv->device,
"invalid ioctl code %08x\n", cmd);
ret = -EINVAL;
ret = -ENOIOCTLCMD;
goto done;
}
lock = 1;