Re: [PATCH] wifi: mt76: mt7915: Fix an error handling path in mt7915_add_interface()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> If mt76_wcid_alloc() fails, the "mt76.mutex" mutex needs to be released as
> done in the other error handling path of mt7915_add_interface().

                                   paths?


…
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
> @@ -246,8 +246,10 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
>  	phy->omac_mask |= BIT_ULL(mvif->mt76.omac_idx);
>
>  	idx = mt76_wcid_alloc(dev->mt76.wcid_mask, mt7915_wtbl_size(dev));
> -	if (idx < 0)
> -		return -ENOSPC;
> +	if (idx < 0) {
> +		ret = -ENOSPC;
> +		goto out;
> +	}
…

Would you dare to support another jump target for this assignment statement?

Regards,
Markus





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux