if (err != -EINVAL) return err; 
static int idefloppy_ioctl(struct inode *inode, struct file *file,			unsigned int cmd, unsigned long arg){	struct block_device *bdev = inode->i_bdev;	struct ide_floppy_obj *floppy = ide_floppy_g(bdev->bd_disk);	ide_drive_t *drive = floppy->drive;	void __user *argp = (void __user *)arg;	int err = generic_ide_ioctl(drive, file, bdev, cmd, arg);	int prevent = (arg) ? 1 : 0;	idefloppy_pc_t pc;	if (err != -EINVAL)		return err;	switch (cmd) {	case CDROMEJECT:		prevent = 0;		/* fall through */	case CDROM_LOCKDOOR:		if (drive->usage > 1)			return -EBUSY;		/* The IOMEGA Clik! Drive doesn't support this command - no room for an eject mechanism */                if (!test_bit(IDEFLOPPY_CLIK_DRIVE, &floppy->flags)) {			idefloppy_create_prevent_cmd(&pc, prevent);			(void) idefloppy_queue_pc_tail(drive, &pc);		}		if (cmd == CDROMEJECT) {			idefloppy_create_start_stop_cmd(&pc, 2);			(void) idefloppy_queue_pc_tail(drive, &pc);		}		return 0;	case IDEFLOPPY_IOCTL_FORMAT_SUPPORTED:		return 0;	case IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY:		return idefloppy_get_format_capacities(drive, argp);	case IDEFLOPPY_IOCTL_FORMAT_START:		if (!(file->f_mode & 2))			return -EPERM;		if (drive->usage > 1) {			/* Don't format if someone is using the disk */			clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS,				  &floppy->flags);			return -EBUSY;		}		set_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags);		err = idefloppy_begin_format(drive, argp);		if (err)			clear_bit(IDEFLOPPY_FORMAT_IN_PROGRESS, &floppy->flags);		return err;		/*		** Note, the bit will be cleared when the device is		** closed.  This is the cleanest way to handle the		** situation where the drive does not support		** format progress reporting.		*/	case IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS:		return idefloppy_get_format_progress(drive, argp);	} 	return -EINVAL;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/07203f6471a11f4eda48acbe528c0ce4704ad42c/ide-floppy.c/buggy/drivers/ide/ide-floppy.c