Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36b26404 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: qrtr: Handle error from skb_put_padto"

parents 60794f6c 5080da67
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -606,8 +606,13 @@ static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb,
	hdr->size = cpu_to_le32(len);
	hdr->confirm_rx = !!confirm_rx;

	skb_put_padto(skb, ALIGN(len, 4) + sizeof(*hdr));
	qrtr_log_tx_msg(node, hdr, skb);
	rc = skb_put_padto(skb, ALIGN(len, 4) + sizeof(*hdr));
	if (rc) {
		pr_err("%s: failed to pad size %lu to %lu rc:%d\n", __func__,
		       len, ALIGN(len, 4) + sizeof(*hdr), rc);
		return rc;
	}

	mutex_lock(&node->ep_lock);
	if (node->ep)