All of lore.kernel.org
 help / color / mirror / Atom feed
From: linguist@masterlinkcorp.com
To: linux-kernel@vger.kernel.org
Date: Sun, 21 Mar 2004 01:24:35 -0500	[thread overview]
Message-ID: <20040321062435.GA27226@goblin.masterlinkcorp.com> (raw)

This is just a random observation, I don't know this piece of code
or the kernel in general, but instinct tells me that where is says
"if (!fd) return -EBADF", it should say "if (!file) return -EBADF".
Just a heads up.

Regards,
Rich

static int tiocgdev(unsigned fd, unsigned cmd,  unsigned int *ptr) 
{ 

	struct file *file = fget(fd);
	struct tty_struct *real_tty;

	if (!fd)
		return -EBADF;
	if (file->f_op->ioctl != tty_ioctl)
		return -EINVAL; 
	real_tty = (struct tty_struct *)file->private_data;
	if (!real_tty) 	
		return -EINVAL; 
	return put_user(new_encode_dev(tty_devnum(real_tty)), ptr); 
} 

             reply	other threads:[~2004-03-21  6:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-21  6:24 linguist [this message]
2004-03-21 16:45 ` [PATCH] fix tiocgdev 32/64bit emul Jeff Garzik
2004-03-21 16:57   ` Christoph Hellwig
2004-03-21 18:50     ` Carl-Daniel Hailfinger
2004-03-21 18:55       ` Christoph Hellwig
2004-03-21 19:57         ` Carl-Daniel Hailfinger
2004-03-21 20:02           ` Christoph Hellwig
2004-03-21 20:17             ` Carl-Daniel Hailfinger
2004-03-21 20:26               ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040321062435.GA27226@goblin.masterlinkcorp.com \
    --to=linguist@masterlinkcorp.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.