diff options
author | David Vrabel <dv02@dv02pc01.europe.root.pri> | 2008-10-15 09:50:10 -0400 |
---|---|---|
committer | David Vrabel <dv02@dv02pc01.europe.root.pri> | 2008-10-15 09:50:10 -0400 |
commit | 92c4d9bd1648b3eaca6b8b8f8932eec390ba7327 (patch) | |
tree | 86e696c08aca7d30284319f1f6adabeeeace1f18 | |
parent | 45c16cd9287819cf1c870f2d8e7738c4c90512ca (diff) |
uwb: use kcalloc where appropriate
Signed-off-by: David Vrabel <david.vrabel@csr.com>
-rw-r--r-- | drivers/usb/wusbcore/mmc.c | 2 | ||||
-rw-r--r-- | drivers/usb/wusbcore/wa-xfer.c | 2 | ||||
-rw-r--r-- | drivers/uwb/lc-dev.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/wusbcore/mmc.c b/drivers/usb/wusbcore/mmc.c index e5390b77aaaa..76907286f156 100644 --- a/drivers/usb/wusbcore/mmc.c +++ b/drivers/usb/wusbcore/mmc.c | |||
@@ -43,7 +43,7 @@ | |||
43 | int wusbhc_mmcie_create(struct wusbhc *wusbhc) | 43 | int wusbhc_mmcie_create(struct wusbhc *wusbhc) |
44 | { | 44 | { |
45 | u8 mmcies = wusbhc->mmcies_max; | 45 | u8 mmcies = wusbhc->mmcies_max; |
46 | wusbhc->mmcie = kzalloc(mmcies * sizeof(wusbhc->mmcie[0]), GFP_KERNEL); | 46 | wusbhc->mmcie = kcalloc(mmcies, sizeof(wusbhc->mmcie[0]), GFP_KERNEL); |
47 | if (wusbhc->mmcie == NULL) | 47 | if (wusbhc->mmcie == NULL) |
48 | return -ENOMEM; | 48 | return -ENOMEM; |
49 | mutex_init(&wusbhc->mmcie_mutex); | 49 | mutex_init(&wusbhc->mmcie_mutex); |
diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c index 7d192f3e6742..c038635d1c64 100644 --- a/drivers/usb/wusbcore/wa-xfer.c +++ b/drivers/usb/wusbcore/wa-xfer.c | |||
@@ -674,7 +674,7 @@ static int __wa_xfer_setup_segs(struct wa_xfer *xfer, size_t xfer_hdr_size) | |||
674 | size_t buf_itr, buf_size, buf_itr_size; | 674 | size_t buf_itr, buf_size, buf_itr_size; |
675 | 675 | ||
676 | result = -ENOMEM; | 676 | result = -ENOMEM; |
677 | xfer->seg = kzalloc(xfer->segs * sizeof(xfer->seg[0]), GFP_ATOMIC); | 677 | xfer->seg = kcalloc(xfer->segs, sizeof(xfer->seg[0]), GFP_ATOMIC); |
678 | if (xfer->seg == NULL) | 678 | if (xfer->seg == NULL) |
679 | goto error_segs_kzalloc; | 679 | goto error_segs_kzalloc; |
680 | buf_itr = 0; | 680 | buf_itr = 0; |
diff --git a/drivers/uwb/lc-dev.c b/drivers/uwb/lc-dev.c index a6cb8ad731a6..15f856c9689a 100644 --- a/drivers/uwb/lc-dev.c +++ b/drivers/uwb/lc-dev.c | |||
@@ -443,7 +443,7 @@ void uwbd_dev_onair(struct uwb_rc *rc, struct uwb_beca_e *bce) | |||
443 | 443 | ||
444 | uwb_mac_addr_print(macbuf, sizeof(macbuf), bce->mac_addr); | 444 | uwb_mac_addr_print(macbuf, sizeof(macbuf), bce->mac_addr); |
445 | uwb_dev_addr_print(devbuf, sizeof(devbuf), &bce->dev_addr); | 445 | uwb_dev_addr_print(devbuf, sizeof(devbuf), &bce->dev_addr); |
446 | uwb_dev = kcalloc(1, sizeof(*uwb_dev), GFP_KERNEL); | 446 | uwb_dev = kzalloc(sizeof(struct uwb_dev), GFP_KERNEL); |
447 | if (uwb_dev == NULL) { | 447 | if (uwb_dev == NULL) { |
448 | dev_err(dev, "new device %s: Cannot allocate memory\n", | 448 | dev_err(dev, "new device %s: Cannot allocate memory\n", |
449 | macbuf); | 449 | macbuf); |