Skip to contentSkip to conversation

sisusbvga: Remove the BKL from ioctl

PATCH New Alessio Igor Bogani 1 participant 1 message Mar 1, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sisusbvga: Remove the BKL from ioctl

Seems to me that BKL is not needed here because necessary locking is already provided by mutex sisusb->lock.

Also change the returned value to long.

---
 drivers/usb/misc/sisusbvga/sisusb.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/usb/misc/sisusbvga/sisusb.c +1 -3
index 8b37a4b..b0746c3 100644
@@ -2964,13 +2964,12 @@ sisusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	struct sisusb_usb_data *sisusb;
 	struct sisusb_info x;
 	struct sisusb_command y;
-	int	retval = 0;
+	long retval = 0;
 	u32 __user *argp = (u32 __user *)arg;
 
 	if (!(sisusb = (struct sisusb_usb_data *)file->private_data))
 		return -ENODEV;
 
-	lock_kernel();
 	mutex_lock(&sisusb->lock);
 
 	/* Sanity check */
@@ -3029,7 +3028,6 @@ sisusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
 err_out:
 	mutex_unlock(&sisusb->lock);
-	unlock_kernel();
 	return retval;
 }
 
Signature · 1 line
1.6.3.3