From: Hans Verkuil Date: Wed, 24 Aug 2016 10:17:22 +0000 (-0300) Subject: [media] cec: fix ioctl return code when not registered X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60815d4a78204915f5cdf79a536bc96d5d23ae5f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [media] cec: fix ioctl return code when not registered Don't return the confusing -EIO error code when the device is not registered, instead return -ENODEV which is the proper thing to do in this situation. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/cec/cec-api.c b/drivers/staging/media/cec/cec-api.c index 6f58ee85eea4..e274e2f22398 100644 --- a/drivers/staging/media/cec/cec-api.c +++ b/drivers/staging/media/cec/cec-api.c @@ -435,7 +435,7 @@ static long cec_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) void __user *parg = (void __user *)arg; if (!devnode->registered) - return -EIO; + return -ENODEV; switch (cmd) { case CEC_ADAP_G_CAPS: