Skip to content

Commit 60815d4

Browse files
Hans Verkuilmchehab
authored andcommitted
[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 <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent a179b69 commit 60815d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/staging/media/cec/cec-api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static long cec_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
435435
void __user *parg = (void __user *)arg;
436436

437437
if (!devnode->registered)
438-
return -EIO;
438+
return -ENODEV;
439439

440440
switch (cmd) {
441441
case CEC_ADAP_G_CAPS:

0 commit comments

Comments
 (0)