All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for v4.8] cec: fix ioctl return code when not registered
@ 2016-08-24 10:17 Hans Verkuil
  0 siblings, 0 replies; only message in thread
From: Hans Verkuil @ 2016-08-24 10:17 UTC (permalink / raw)
  To: linux-media

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 <hans.verkuil@cisco.com>
---
diff --git a/drivers/staging/media/cec/cec-api.c b/drivers/staging/media/cec/cec-api.c
index 7be7615..049f171 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:

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-24 10:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-24 10:17 [PATCH for v4.8] cec: fix ioctl return code when not registered Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.