Commit cadae477 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

mt76: usb: reduce code indentation in mt76u_alloc_tx

Improve code readability reducing code indentation in
mt76u_alloc_tx
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 4e04ba6a
...@@ -818,15 +818,14 @@ static int mt76u_alloc_tx(struct mt76_dev *dev) ...@@ -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_kcalloc(dev->dev, MT_SG_MAX_SIZE,
buf->urb->sg = devm_kzalloc(dev->dev, size, sizeof(struct scatterlist),
GFP_KERNEL); GFP_KERNEL);
if (!buf->urb->sg) if (!buf->urb->sg)
return -ENOMEM; return -ENOMEM;
}
} }
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment