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

Commit 3456b221 authored by David Woodhouse's avatar David Woodhouse
Browse files

solos: Fix under-allocation of skb size for get/set parameters

parent af780656
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ static ssize_t solos_param_show(struct device *dev, struct device_attribute *att

	buflen = strlen(attr->attr.name) + 10;

	skb = alloc_skb(buflen, GFP_KERNEL);
	skb = alloc_skb(sizeof(*header) + buflen, GFP_KERNEL);
	if (!skb) {
		dev_warn(&card->dev->dev, "Failed to allocate sk_buff in solos_param_show()\n");
		return -ENOMEM;
@@ -215,7 +215,7 @@ static ssize_t solos_param_store(struct device *dev, struct device_attribute *at

	buflen = strlen(attr->attr.name) + 11 + count;

	skb = alloc_skb(buflen, GFP_KERNEL);
	skb = alloc_skb(sizeof(*header) + buflen, GFP_KERNEL);
	if (!skb) {
		dev_warn(&card->dev->dev, "Failed to allocate sk_buff in solos_param_store()\n");
		return -ENOMEM;