Re: [3/5] Bluetooth: btmrvl: One check less in btmrvl_sdio_card_to_host()

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

 



>> @@ -797,12 +792,18 @@ static int btmrvl_sdio_card_to_host(struct btmrvl_private *priv)
>> 		break;
>> 	}
>>
>> -exit:
>> -	if (ret) {
>> -		hdev->stat.err_rx++;
>> -		kfree_skb(skb);
>> -	}
>> +	return 0;
>> +
>> +free_skb:
>> +	kfree_skb(skb);
>> +e_io:
>> +	ret = -EIO;
>> +	goto increment_counter;
>>
>> +e_inval:
>> +	ret = -EINVAL;
>> +increment_counter:
>> +	hdev->stat.err_rx++;
>> 	return ret;
> 
> Nope!
> 
> This is not easier to read for me. This goto exit jumping and I hate that.

Can the software design direction become feasible to omit the repeated check
for the variable “ret” (and further initialisations)?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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