Re: [PATCH 8/8] wifi: nl80211: clean up color-change beacon data on errors

From: Johannes Berg

Date: Wed Jul 22 2026 - 10:39:06 EST



> @@ -18754,11 +18754,13 @@ static int nl80211_color_change(struct sk_buff *skb, struct genl_info *info)
> wdev->links[params.link_id].ap.chandef.chan,
> info->extack);
> if (err)
> - return err;
> + goto out;
>
> tb = kzalloc_objs(*tb, NL80211_ATTR_MAX + 1);
> - if (!tb)
> - return -ENOMEM;
> + if (!tb) {
> + err = -ENOMEM;
> + goto out;
> + }

It'd be simpler for the cleanup to just change the order.

johannes