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:

committed by
Felix Fietkau

parent
4e04ba6aa3
commit
cadae4772d
@@ -818,15 +818,14 @@ static int mt76u_alloc_tx(struct mt76_dev *dev)
|
|||||||
if (!buf->urb)
|
if (!buf->urb)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
if (dev->usb.sg_en) {
|
if (!dev->usb.sg_en)
|
||||||
size_t size = MT_SG_MAX_SIZE *
|
continue;
|
||||||
sizeof(struct scatterlist);
|
|
||||||
|
|
||||||
buf->urb->sg = devm_kzalloc(dev->dev, size,
|
buf->urb->sg = devm_kcalloc(dev->dev, MT_SG_MAX_SIZE,
|
||||||
GFP_KERNEL);
|
sizeof(struct scatterlist),
|
||||||
if (!buf->urb->sg)
|
GFP_KERNEL);
|
||||||
return -ENOMEM;
|
if (!buf->urb->sg)
|
||||||
}
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user