提交 cadae477 编写于 作者: L Lorenzo Bianconi 提交者: Felix Fietkau

mt76: usb: reduce code indentation in mt76u_alloc_tx

Improve code readability reducing code indentation in
mt76u_alloc_tx
Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: NFelix Fietkau <nbd@nbd.name>
上级 4e04ba6a
......@@ -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);
buf->urb->sg = devm_kzalloc(dev->dev, size,
GFP_KERNEL);
if (!buf->urb->sg)
return -ENOMEM;
}
if (!dev->usb.sg_en)
continue;
buf->urb->sg = devm_kcalloc(dev->dev, MT_SG_MAX_SIZE,
sizeof(struct scatterlist),
GFP_KERNEL);
if (!buf->urb->sg)
return -ENOMEM;
}
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册