瀏覽代碼

media: dmxdev: fix error code for invalid ioctls

Returning -EINVAL when an ioctl is not implemented is a very
bad idea, as it is hard to distinguish from other error
contitions that an ioctl could lead. Replace it by its
right error code: -ENOTTY.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Mauro Carvalho Chehab 7 年之前
父節點
當前提交
a145f64c61
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/media/dvb-core/dmxdev.c

+ 1 - 1
drivers/media/dvb-core/dmxdev.c

@@ -1160,7 +1160,7 @@ static int dvb_demux_do_ioctl(struct file *file,
 		break;
 #endif
 	default:
-		ret = -EINVAL;
+		ret = -ENOTTY;
 		break;
 	}
 	mutex_unlock(&dmxdev->mutex);