Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300009
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/3] net-iwlegacy: One check less in il_eeprom_init() after error detection |
| Date | 2016-01-02 00:20 +0100 |
| Message-ID | <qMh9f-ms-5@gated-at.bofh.it> (permalink) |
| References | <qEuGl-43C-5@gated-at.bofh.it> <qMeuJ-780-3@gated-at.bofh.it> <qMeEp-7bc-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello.
On 1/1/2016 11:31 PM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 1 Jan 2016 21:12:29 +0100
>
> This issue was detected by using the Coccinelle software.
>
> Adjust a jump target to avoid a check repetition before the function
> call "il_eeprom_free".
One question: why?
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/net/wireless/intel/iwlegacy/common.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
> index c3afaf7..ae45fd3 100644
> --- a/drivers/net/wireless/intel/iwlegacy/common.c
> +++ b/drivers/net/wireless/intel/iwlegacy/common.c
[...]
> @@ -772,9 +772,11 @@ il_eeprom_init(struct il_priv *il)
> done:
> il->ops->eeprom_release_semaphore(il);
>
> -err:
> - if (ret)
> + if (ret) {
> +free_eeprom:
This is ugly, I'd say.
[...]
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] net-iwlegacy: Fine-tuning for il_eeprom_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 21:30 +0100
[PATCH 2/3] net-iwlegacy: One check less in il_eeprom_init() after error detection SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 21:40 +0100
Re: [PATCH 2/3] net-iwlegacy: One check less in il_eeprom_init() after error detection Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-01-02 00:20 +0100
[PATCH 1/3] net-iwlegacy: Refactoring for il_eeprom_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 21:40 +0100
Re: [PATCH 1/3] net-iwlegacy: Refactoring for il_eeprom_init() Stanislaw Gruszka <sgruszka@redhat.com> - 2016-01-04 10:40 +0100
[PATCH 3/3] net-iwlegacy: Another refactoring for il_eeprom_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 21:40 +0100
Re: [PATCH 3/3] net-iwlegacy: Another refactoring for il_eeprom_init() Souptick Joarder <jrdr.linux@gmail.com> - 2016-01-02 19:20 +0100
csiph-web