# HG changeset patch # User heiko # Date 1011382892 -3600 # Node ID ed7a768ff898e39111fd1079bb97c0e15f05e66a # Parent 12065fad228b85dffced60199d4cd8df9ee24267 blocking subdevice -1 diff -r 12065fad228b -r ed7a768ff898 me8100.c --- a/me8100.c Fri Jan 18 20:22:52 2002 +0100 +++ b/me8100.c Fri Jan 18 20:41:32 2002 +0100 @@ -571,7 +571,7 @@ * Author: GG */ static int me8100_open(struct inode *inode_ptr, struct file *file_ptr){ - int device,subdevice; + int device, subdevice; me8100_info_type *info; struct me8100_subinfo *subinfo; @@ -584,6 +584,12 @@ info = &info_vec[device]; subinfo = &info->subinfo[subdevice]; + /* Currently we can't support the old style minor numbers. */ + if (subinfo < 0) { + printk(KERN_ERR "ME8100:me8100_open(): Bad subdevice %d\n", subdevice); + return -ENODEV; + } + if(device >= me8100_board_count){ printk(KERN_ERR"ME8100:me8100_open():Board %d doesn't exist\n", device);