[no subject]

From: linguist
Date: Sun Mar 21 2004 - 01:36:06 EST


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);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/