lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <09cd7314-d053-3a6d-a9e1-d666a00ddb55@users.sourceforge.net>
Date:   Tue, 13 Mar 2018 08:46:33 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     Marcel Holtmann <marcel@...tmann.org>,
        linux-bluetooth@...r.kernel.org
Cc:     Johan Hedberg <johan.hedberg@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [3/5] Bluetooth: btmrvl: One check less in
 btmrvl_sdio_card_to_host()

>> @@ -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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ