|
@@ -3036,10 +3036,9 @@ static int sisusb_probe(struct usb_interface *intf,
|
|
|
|
|
|
/* Allocate memory for our private */
|
|
/* Allocate memory for our private */
|
|
sisusb = kzalloc(sizeof(*sisusb), GFP_KERNEL);
|
|
sisusb = kzalloc(sizeof(*sisusb), GFP_KERNEL);
|
|
- if (!sisusb) {
|
|
|
|
- dev_err(&dev->dev, "Failed to allocate memory for private data\n");
|
|
|
|
|
|
+ if (!sisusb)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
- }
|
|
|
|
|
|
+
|
|
kref_init(&sisusb->kref);
|
|
kref_init(&sisusb->kref);
|
|
|
|
|
|
mutex_init(&(sisusb->lock));
|
|
mutex_init(&(sisusb->lock));
|
|
@@ -3066,7 +3065,6 @@ static int sisusb_probe(struct usb_interface *intf,
|
|
sisusb->ibufsize = SISUSB_IBUF_SIZE;
|
|
sisusb->ibufsize = SISUSB_IBUF_SIZE;
|
|
sisusb->ibuf = kmalloc(SISUSB_IBUF_SIZE, GFP_KERNEL);
|
|
sisusb->ibuf = kmalloc(SISUSB_IBUF_SIZE, GFP_KERNEL);
|
|
if (!sisusb->ibuf) {
|
|
if (!sisusb->ibuf) {
|
|
- dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate memory for input buffer");
|
|
|
|
retval = -ENOMEM;
|
|
retval = -ENOMEM;
|
|
goto error_2;
|
|
goto error_2;
|
|
}
|
|
}
|
|
@@ -3077,7 +3075,6 @@ static int sisusb_probe(struct usb_interface *intf,
|
|
sisusb->obuf[i] = kmalloc(SISUSB_OBUF_SIZE, GFP_KERNEL);
|
|
sisusb->obuf[i] = kmalloc(SISUSB_OBUF_SIZE, GFP_KERNEL);
|
|
if (!sisusb->obuf[i]) {
|
|
if (!sisusb->obuf[i]) {
|
|
if (i == 0) {
|
|
if (i == 0) {
|
|
- dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate memory for output buffer\n");
|
|
|
|
retval = -ENOMEM;
|
|
retval = -ENOMEM;
|
|
goto error_3;
|
|
goto error_3;
|
|
}
|
|
}
|