diff options
-rw-r--r-- | drivers/usb/class/usblp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 0647164d36db..68a2239cd0b6 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c | |||
@@ -1076,15 +1076,16 @@ static int usblp_probe(struct usb_interface *intf, | |||
1076 | const struct usb_device_id *id) | 1076 | const struct usb_device_id *id) |
1077 | { | 1077 | { |
1078 | struct usb_device *dev = interface_to_usbdev (intf); | 1078 | struct usb_device *dev = interface_to_usbdev (intf); |
1079 | struct usblp *usblp = NULL; | 1079 | struct usblp *usblp; |
1080 | int protocol; | 1080 | int protocol; |
1081 | int retval; | 1081 | int retval; |
1082 | 1082 | ||
1083 | /* Malloc and start initializing usblp structure so we can use it | 1083 | /* Malloc and start initializing usblp structure so we can use it |
1084 | * directly. */ | 1084 | * directly. */ |
1085 | if (!(usblp = kzalloc(sizeof(struct usblp), GFP_KERNEL))) { | 1085 | usblp = kzalloc(sizeof(struct usblp), GFP_KERNEL); |
1086 | if (!usblp) { | ||
1086 | retval = -ENOMEM; | 1087 | retval = -ENOMEM; |
1087 | goto abort; | 1088 | goto abort_ret; |
1088 | } | 1089 | } |
1089 | usblp->dev = dev; | 1090 | usblp->dev = dev; |
1090 | mutex_init(&usblp->wmut); | 1091 | mutex_init(&usblp->wmut); |
@@ -1179,12 +1180,11 @@ abort_intfdata: | |||
1179 | usb_set_intfdata (intf, NULL); | 1180 | usb_set_intfdata (intf, NULL); |
1180 | device_remove_file(&intf->dev, &dev_attr_ieee1284_id); | 1181 | device_remove_file(&intf->dev, &dev_attr_ieee1284_id); |
1181 | abort: | 1182 | abort: |
1182 | if (usblp) { | 1183 | kfree(usblp->readbuf); |
1183 | kfree(usblp->readbuf); | 1184 | kfree(usblp->statusbuf); |
1184 | kfree(usblp->statusbuf); | 1185 | kfree(usblp->device_id_string); |
1185 | kfree(usblp->device_id_string); | 1186 | kfree(usblp); |
1186 | kfree(usblp); | 1187 | abort_ret: |
1187 | } | ||
1188 | return retval; | 1188 | return retval; |
1189 | } | 1189 | } |
1190 | 1190 | ||