[media] media:dvb:fix up ENOIOCTLCMD error handling
authorWanlong Gao <gaowanlong@cn.fujitsu.com>
Mon, 27 Aug 2012 06:23:14 +0000 (03:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 15 Sep 2012 16:19:54 +0000 (13:19 -0300)
At commit 07d106d0, Linus pointed out that ENOIOCTLCMD should be
translated as ENOTTY to user mode.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb-core/dvbdev.c

index 39eab73b01ae9bb5e0a9c4d9667e3c99b4b51415..d33101aaf0b5e6bb51e55baef9b21ba0d53c4e9a 100644 (file)
@@ -420,7 +420,7 @@ int dvb_usercopy(struct file *file,
        /* call driver */
        mutex_lock(&dvbdev_mutex);
        if ((err = func(file, cmd, parg)) == -ENOIOCTLCMD)
-               err = -EINVAL;
+               err = -ENOTTY;
        mutex_unlock(&dvbdev_mutex);
 
        if (err < 0)