me8100.c
changeset 9 ed7a768ff898
parent 8 12065fad228b
child 10 b560de13b236
--- 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);