summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/usb/class/usbtmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/usb/class/usbtmc.c')
-rw-r--r--kernel/drivers/usb/class/usbtmc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/drivers/usb/class/usbtmc.c b/kernel/drivers/usb/class/usbtmc.c
index 7a11a8263..deaddb950 100644
--- a/kernel/drivers/usb/class/usbtmc.c
+++ b/kernel/drivers/usb/class/usbtmc.c
@@ -121,6 +121,7 @@ static void usbtmc_delete(struct kref *kref)
struct usbtmc_device_data *data = to_usbtmc_data(kref);
usb_put_dev(data->usb_dev);
+ kfree(data);
}
static int usbtmc_open(struct inode *inode, struct file *filp)
@@ -1104,7 +1105,7 @@ static int usbtmc_probe(struct usb_interface *intf,
dev_dbg(&intf->dev, "%s called\n", __func__);
- data = devm_kzalloc(&intf->dev, sizeof(*data), GFP_KERNEL);
+ data = kmalloc(sizeof(*data), GFP_KERNEL);
if (!data)
return -ENOMEM;