Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b842b6e authored by Pekka Enberg's avatar Pekka Enberg Committed by Linus Torvalds
Browse files

[PATCH] USB: convert kcalloc to kzalloc



This patch converts kcalloc(1, ...) calls to use the new kzalloc() function.

Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a97e148a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -960,7 +960,7 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
			intf->altsetting->desc.bInterfaceNumber);

	/* instance init */
	instance = kcalloc(1, sizeof(*instance) + sizeof(struct urb *) * (num_rcv_urbs + num_snd_urbs), GFP_KERNEL);
	instance = kzalloc(sizeof(*instance) + sizeof(struct urb *) * (num_rcv_urbs + num_snd_urbs), GFP_KERNEL);
	if (!instance) {
		dev_dbg(dev, "%s: no memory for instance data!\n", __func__);
		return -ENOMEM;
+1 −1
Original line number Diff line number Diff line
@@ -1669,7 +1669,7 @@ struct usb_hcd *usb_create_hcd (const struct hc_driver *driver,
{
	struct usb_hcd *hcd;

	hcd = kcalloc(1, sizeof(*hcd) + driver->hcd_priv_size, GFP_KERNEL);
	hcd = kzalloc(sizeof(*hcd) + driver->hcd_priv_size, GFP_KERNEL);
	if (!hcd) {
		dev_dbg (dev, "hcd alloc failed\n");
		return NULL;
+1 −1
Original line number Diff line number Diff line
@@ -638,7 +638,7 @@ iso_stream_alloc (unsigned mem_flags)
{
	struct ehci_iso_stream *stream;

	stream = kcalloc(1, sizeof *stream, mem_flags);
	stream = kzalloc(sizeof *stream, mem_flags);
	if (likely (stream != NULL)) {
		INIT_LIST_HEAD(&stream->td_list);
		INIT_LIST_HEAD(&stream->free_list);
+1 −1
Original line number Diff line number Diff line
@@ -717,7 +717,7 @@ static int isp116x_urb_enqueue(struct usb_hcd *hcd,
	}
	/* avoid all allocations within spinlocks: request or endpoint */
	if (!hep->hcpriv) {
		ep = kcalloc(1, sizeof *ep, mem_flags);
		ep = kzalloc(sizeof *ep, mem_flags);
		if (!ep)
			return -ENOMEM;
	}
+1 −1
Original line number Diff line number Diff line
@@ -835,7 +835,7 @@ static int sl811h_urb_enqueue(

	/* avoid all allocations within spinlocks */
	if (!hep->hcpriv)
		ep = kcalloc(1, sizeof *ep, mem_flags);
		ep = kzalloc(sizeof *ep, mem_flags);

	spin_lock_irqsave(&sl811->lock, flags);

Loading