Skip to contentSkip to conversation

cec: fix ioctl return code when not registered

PATCH New Hans Verkuil 1 participant 1 message Aug 24, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

drivers/staging/media/cec/cec-api.c +1 -1
index 7be7615..049f171 100644
@@ -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: