case SOUND_MAJOR: 
} else if (major == SOUND_MAJOR) { 
static int snd_hwdep_open(struct inode *inode, struct file * file){	int major = imajor(inode);	int cardnum;	int device;	snd_hwdep_t *hw;	int err;	wait_queue_t wait;	switch (major) {	case CONFIG_SND_MAJOR:		cardnum = SNDRV_MINOR_CARD(iminor(inode));		device = SNDRV_MINOR_DEVICE(iminor(inode)) - SNDRV_MINOR_HWDEP;		break;#ifdef CONFIG_SND_OSSEMUL	case SOUND_MAJOR:		cardnum = SNDRV_MINOR_OSS_CARD(iminor(inode));		device = 0;		break;#endif	default:		return -ENXIO;	}	cardnum %= SNDRV_CARDS;	device %= SNDRV_MINOR_HWDEPS;	hw = snd_hwdep_devices[(cardnum * SNDRV_MINOR_HWDEPS) + device];	if (hw == NULL)		return -ENODEV;	if (!hw->ops.open)		return -ENXIO;#ifdef CONFIG_SND_OSSEMUL	if (major == SOUND_MAJOR && hw->oss_type < 0)		return -ENXIO;#endif	if (!try_module_get(hw->card->module))		return -EFAULT;	init_waitqueue_entry(&wait, current);	add_wait_queue(&hw->open_wait, &wait);	down(&hw->open_mutex);	while (1) {		if (hw->exclusive && hw->used > 0) {			err = -EBUSY;			break;		}		err = hw->ops.open(hw, file);		if (err >= 0)			break;		if (err == -EAGAIN) {			if (file->f_flags & O_NONBLOCK) {				err = -EBUSY;				break;			}		} else			break;		set_current_state(TASK_INTERRUPTIBLE);		up(&hw->open_mutex);		schedule();		down(&hw->open_mutex);		if (signal_pending(current)) {			err = -ERESTARTSYS;			break;		}	}	remove_wait_queue(&hw->open_wait, &wait);	if (err >= 0) {		err = snd_card_file_add(hw->card, file);		if (err >= 0) {			file->private_data = hw;			hw->used++;		} else {			if (hw->ops.release)				hw->ops.release(hw, file);		}	}	up(&hw->open_mutex);	if (err < 0)		module_put(hw->card->module);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f1902860161ff212c515e7ea629e880fec856a37/hwdep.c/buggy/sound/core/hwdep.c