Commit e5627bdf authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] remove some junk from hd98.c's ioctl implementation

Also pointed out by Al.
parent 54b20953
......@@ -655,11 +655,8 @@ static int hd_ioctl(struct inode * inode, struct file * file,
unsigned int cmd, unsigned long arg)
{
struct hd_geometry *loc = (struct hd_geometry *) arg;
int dev;
int dev = DEVICE_NR(inode->i_rdev);
if ((!inode) || kdev_none(inode->i_rdev))
return -EINVAL;
dev = DEVICE_NR(inode->i_rdev);
if (dev >= NR_HD)
return -EINVAL;
switch (cmd) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment