if (!(bfusb = kmalloc(sizeof(struct bfusb), GFP_KERNEL))) { 
if (!(bfusb = kzalloc(sizeof(struct bfusb), GFP_KERNEL))) { 
static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *id){	const struct firmware *firmware;	struct usb_device *udev = interface_to_usbdev(intf);	struct usb_host_endpoint *bulk_out_ep;	struct usb_host_endpoint *bulk_in_ep;	struct hci_dev *hdev;	struct bfusb *bfusb;	BT_DBG("intf %p id %p", intf, id);	if (ignore)		return -ENODEV;	/* Check number of endpoints */	if (intf->cur_altsetting->desc.bNumEndpoints < 2)		return -EIO;	bulk_out_ep = &intf->cur_altsetting->endpoint[0];	bulk_in_ep  = &intf->cur_altsetting->endpoint[1];	if (!bulk_out_ep || !bulk_in_ep) {		BT_ERR("Bulk endpoints not found");		goto done;	}	/* Initialize control structure and load firmware */	if (!(bfusb = kmalloc(sizeof(struct bfusb), GFP_KERNEL))) {		BT_ERR("Can't allocate memory for control structure");		goto done;	}	memset(bfusb, 0, sizeof(struct bfusb));	bfusb->udev = udev;	bfusb->bulk_in_ep    = bulk_in_ep->desc.bEndpointAddress;	bfusb->bulk_out_ep   = bulk_out_ep->desc.bEndpointAddress;	bfusb->bulk_pkt_size = le16_to_cpu(bulk_out_ep->desc.wMaxPacketSize);	rwlock_init(&bfusb->lock);	bfusb->reassembly = NULL;	skb_queue_head_init(&bfusb->transmit_q);	skb_queue_head_init(&bfusb->pending_q);	skb_queue_head_init(&bfusb->completed_q);	if (request_firmware(&firmware, "bfubase.frm", &udev->dev) < 0) {		BT_ERR("Firmware request failed");		goto error;	}	BT_DBG("firmware data %p size %d", firmware->data, firmware->size);	if (bfusb_load_firmware(bfusb, firmware->data, firmware->size) < 0) {		BT_ERR("Firmware loading failed");		goto release;	}	release_firmware(firmware);	/* Initialize and register HCI device */	hdev = hci_alloc_dev();	if (!hdev) {		BT_ERR("Can't allocate HCI device");		goto error;	}	bfusb->hdev = hdev;	hdev->type = HCI_USB;	hdev->driver_data = bfusb;	SET_HCIDEV_DEV(hdev, &intf->dev);	hdev->open     = bfusb_open;	hdev->close    = bfusb_close;	hdev->flush    = bfusb_flush;	hdev->send     = bfusb_send_frame;	hdev->destruct = bfusb_destruct;	hdev->ioctl    = bfusb_ioctl;	hdev->owner = THIS_MODULE;	if (hci_register_dev(hdev) < 0) {		BT_ERR("Can't register HCI device");		hci_free_dev(hdev);		goto error;	}	usb_set_intfdata(intf, bfusb);	return 0;release:	release_firmware(firmware);error:	kfree(bfusb);done:	return -EIO;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/089b1dbbde28f0f641c20beabba28fa89ab4fab9/bfusb.c/clean/drivers/bluetooth/bfusb.c