uwb: use kcalloc where appropriate

Signed-off-by: David Vrabel <david.vrabel@csr.com>
This commit is contained in:
David Vrabel
2008-10-15 14:50:10 +01:00
parent 45c16cd928
commit 92c4d9bd16
3 changed files with 3 additions and 3 deletions

View File

@@ -43,7 +43,7 @@
int wusbhc_mmcie_create(struct wusbhc *wusbhc)
{
u8 mmcies = wusbhc->mmcies_max;
wusbhc->mmcie = kzalloc(mmcies * sizeof(wusbhc->mmcie[0]), GFP_KERNEL);
wusbhc->mmcie = kcalloc(mmcies, sizeof(wusbhc->mmcie[0]), GFP_KERNEL);
if (wusbhc->mmcie == NULL)
return -ENOMEM;
mutex_init(&wusbhc->mmcie_mutex);

View File

@@ -674,7 +674,7 @@ static int __wa_xfer_setup_segs(struct wa_xfer *xfer, size_t xfer_hdr_size)
size_t buf_itr, buf_size, buf_itr_size;
result = -ENOMEM;
xfer->seg = kzalloc(xfer->segs * sizeof(xfer->seg[0]), GFP_ATOMIC);
xfer->seg = kcalloc(xfer->segs, sizeof(xfer->seg[0]), GFP_ATOMIC);
if (xfer->seg == NULL)
goto error_segs_kzalloc;
buf_itr = 0;