aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/misc/rio500.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c
index 88f6abe73624..330c18e390b8 100644
--- a/drivers/usb/misc/rio500.c
+++ b/drivers/usb/misc/rio500.c
@@ -118,10 +118,7 @@ ioctl_rio(struct inode *inode, struct file *file, unsigned int cmd,
118 118
119 mutex_lock(&(rio->lock)); 119 mutex_lock(&(rio->lock));
120 /* Sanity check to make sure rio is connected, powered, etc */ 120 /* Sanity check to make sure rio is connected, powered, etc */
121 if ( rio == NULL || 121 if (rio->present == 0 || rio->rio_dev == NULL) {
122 rio->present == 0 ||
123 rio->rio_dev == NULL )
124 {
125 retval = -ENODEV; 122 retval = -ENODEV;
126 goto err_out; 123 goto err_out;
127 } 124 }
@@ -280,10 +277,7 @@ write_rio(struct file *file, const char __user *buffer,
280 if (intr) 277 if (intr)
281 return -EINTR; 278 return -EINTR;
282 /* Sanity check to make sure rio is connected, powered, etc */ 279 /* Sanity check to make sure rio is connected, powered, etc */
283 if ( rio == NULL || 280 if (rio->present == 0 || rio->rio_dev == NULL) {
284 rio->present == 0 ||
285 rio->rio_dev == NULL )
286 {
287 mutex_unlock(&(rio->lock)); 281 mutex_unlock(&(rio->lock));
288 return -ENODEV; 282 return -ENODEV;
289 } 283 }
@@ -369,10 +363,7 @@ read_rio(struct file *file, char __user *buffer, size_t count, loff_t * ppos)
369 if (intr) 363 if (intr)
370 return -EINTR; 364 return -EINTR;
371 /* Sanity check to make sure rio is connected, powered, etc */ 365 /* Sanity check to make sure rio is connected, powered, etc */
372 if ( rio == NULL || 366 if (rio->present == 0 || rio->rio_dev == NULL) {
373 rio->present == 0 ||
374 rio->rio_dev == NULL )
375 {
376 mutex_unlock(&(rio->lock)); 367 mutex_unlock(&(rio->lock));
377 return -ENODEV; 368 return -ENODEV;
378 } 369 }