mt76: usb: reduce code indentation in mt76u_alloc_tx

Improve code readability reducing code indentation in
mt76u_alloc_tx

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Lorenzo Bianconi 2019-03-04 13:59:49 +01:00 committed by Felix Fietkau
parent 4e04ba6aa3
commit cadae4772d
1 changed files with 7 additions and 8 deletions

View File

@ -818,15 +818,14 @@ static int mt76u_alloc_tx(struct mt76_dev *dev)
if (!buf->urb)
return -ENOMEM;
if (dev->usb.sg_en) {
size_t size = MT_SG_MAX_SIZE *
sizeof(struct scatterlist);
if (!dev->usb.sg_en)
continue;
buf->urb->sg = devm_kzalloc(dev->dev, size,
GFP_KERNEL);
if (!buf->urb->sg)
return -ENOMEM;
}
buf->urb->sg = devm_kcalloc(dev->dev, MT_SG_MAX_SIZE,
sizeof(struct scatterlist),
GFP_KERNEL);
if (!buf->urb->sg)
return -ENOMEM;
}
}
return 0;