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>
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;