/* -EBADF : Invalid @fd file descriptor. -EINVAL : The @fd file descriptor is not an eventfd file.  */
struct file* eventfd_fget(int fd)
/* -EBADF : Invalid @fd file descriptor. -EINVAL : The @fd file descriptor is not an eventfd file.  */
struct file* eventfd_fget(int fd)
{
	struct file *file;
	file = fget(fd);
	if (!file)
		return ERR_PTR(-EBADF);
	if (file->f_op != &eventfd_fops) {
		fput(file);
		return ERR_PTR(-EINVAL);
	}
	return file;
}