Search Linux Wireless

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]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux