Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1c754a9 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] V4L2: drivers implementing vidioc_default should also return -ENOTTY



If the vidioc_default implementation doesn't support the ioctl, then drivers
must return -ENOTTY instead of -EINVAL.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ee71e7b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1137,7 +1137,7 @@ static long cx18_default(struct file *file, void *fh, bool valid_prio,
	}

	default:
		return -EINVAL;
		return -ENOTTY;
	}
	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -1761,7 +1761,7 @@ static long vpfe_param_handler(struct file *file, void *priv,
		}
		break;
	default:
		ret = -EINVAL;
		ret = -ENOTTY;
	}
unlock_out:
	mutex_unlock(&vpfe_dev->lock);
+1 −1
Original line number Diff line number Diff line
@@ -1827,7 +1827,7 @@ static long ivtv_default(struct file *file, void *fh, bool valid_prio,
		return ivtv_decoder_ioctls(file, cmd, (void *)arg);

	default:
		return -EINVAL;
		return -ENOTTY;
	}
	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -1570,7 +1570,7 @@ static long vidioc_default(struct file *file, void *fh, bool valid_prio,
		return meyeioc_stilljcapt((int *) arg);

	default:
		return -EINVAL;
		return -ENOTTY;
	}

}
+1 −1
Original line number Diff line number Diff line
@@ -688,7 +688,7 @@ static long vidioc_default(struct file *file, void *fh, bool valid_prio,
/*
		DEB2(pr_err("does not handle this ioctl\n"));
*/
		return -ENOIOCTLCMD;
		return -ENOTTY;
	}
	return 0;
}