mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: usb: reduce code indentation in mt76u_alloc_tx
Improve code readability reducing code indentation in mt76u_alloc_tx Signed-off-by: Lorenzo Bianconi <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
48dc7e9730
commit
223649049a
@@ -819,15 +819,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;
|
||||
|
||||
Reference in New Issue
Block a user