HID: remove excessive _EMERG messages from hidraw
authorJiri Kosina <jkosina@suse.cz>
Thu, 25 Mar 2010 14:20:01 +0000 (15:20 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 25 Mar 2010 14:20:01 +0000 (15:20 +0100)
We don't need to shout loudly when device gets disconnected
while hidraw node has been open, as this is properly handled
in disconnect() and protected by minors_lock already.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hidraw.c

index 589dac5b5f569bff93828ea7d18bf3ff6a8e9316..7919d3e843b69d8764dfba05285ce0bfcd5266d6 100644 (file)
@@ -176,8 +176,6 @@ static int hidraw_open(struct inode *inode, struct file *file)
 
        mutex_lock(&minors_lock);
        if (!hidraw_table[minor]) {
-               printk(KERN_EMERG "hidraw device with minor %d doesn't exist\n",
-                               minor);
                kfree(list);
                err = -ENODEV;
                goto out_unlock;
@@ -216,11 +214,8 @@ static int hidraw_release(struct inode * inode, struct file * file)
        struct hidraw *dev;
        struct hidraw_list *list = file->private_data;
 
-       if (!hidraw_table[minor]) {
-               printk(KERN_EMERG "hidraw device with minor %d doesn't exist\n",
-                               minor);
+       if (!hidraw_table[minor])
                return -ENODEV;
-       }
 
        list_del(&list->node);
        dev = hidraw_table[minor];