diff options
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/adutux.c | 5 | ||||
-rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb.c | 3 | ||||
-rw-r--r-- | drivers/usb/misc/usb3503.c | 8 | ||||
-rw-r--r-- | drivers/usb/misc/yurex.c | 6 |
4 files changed, 7 insertions, 15 deletions
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c index 493c7f268b6f..3071c0ef909b 100644 --- a/drivers/usb/misc/adutux.c +++ b/drivers/usb/misc/adutux.c @@ -814,15 +814,10 @@ static void adu_disconnect(struct usb_interface *interface) usb_set_intfdata(interface, NULL); /* if the device is not opened, then we clean up right now */ - dev_dbg(&dev->udev->dev, "%s : open count %d\n", - __func__, dev->open_count); if (!dev->open_count) adu_delete(dev); mutex_unlock(&adutux_mutex); - - dev_info(&interface->dev, "ADU device adutux%d now disconnected\n", - (minor - ADU_MINOR_BASE)); } /* usb specific object needed to register this driver with the usb subsystem */ diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 633caf643122..022dc0008f2a 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c @@ -2472,8 +2472,7 @@ sisusb_delete(struct kref *kref) if (!sisusb) return; - if (sisusb->sisusb_dev) - usb_put_dev(sisusb->sisusb_dev); + usb_put_dev(sisusb->sisusb_dev); sisusb->sisusb_dev = NULL; sisusb_free_buffers(sisusb); diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb/misc/usb3503.c index ae7e1206ca54..b9af8cb19215 100644 --- a/drivers/usb/misc/usb3503.c +++ b/drivers/usb/misc/usb3503.c @@ -314,10 +314,8 @@ static int usb3503_i2c_probe(struct i2c_client *i2c, int err; hub = devm_kzalloc(&i2c->dev, sizeof(struct usb3503), GFP_KERNEL); - if (!hub) { - dev_err(&i2c->dev, "private data alloc fail\n"); + if (!hub) return -ENOMEM; - } i2c_set_clientdata(i2c, hub); hub->regmap = devm_regmap_init_i2c(i2c, &usb3503_regmap_config); @@ -336,10 +334,8 @@ static int usb3503_platform_probe(struct platform_device *pdev) struct usb3503 *hub; hub = devm_kzalloc(&pdev->dev, sizeof(struct usb3503), GFP_KERNEL); - if (!hub) { - dev_err(&pdev->dev, "private data alloc fail\n"); + if (!hub) return -ENOMEM; - } hub->dev = &pdev->dev; return usb3503_probe(hub); diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c index c3a45da11610..343fa6ff9f4b 100644 --- a/drivers/usb/misc/yurex.c +++ b/drivers/usb/misc/yurex.c @@ -410,7 +410,8 @@ static int yurex_release(struct inode *inode, struct file *file) return 0; } -static ssize_t yurex_read(struct file *file, char *buffer, size_t count, loff_t *ppos) +static ssize_t yurex_read(struct file *file, char __user *buffer, size_t count, + loff_t *ppos) { struct usb_yurex *dev; int retval = 0; @@ -444,7 +445,8 @@ exit: return retval; } -static ssize_t yurex_write(struct file *file, const char *user_buffer, size_t count, loff_t *ppos) +static ssize_t yurex_write(struct file *file, const char __user *user_buffer, + size_t count, loff_t *ppos) { struct usb_yurex *dev; int i, set = 0, retval = 0; |