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: <20170822140343.yg7bh3qylthja3tn@mwanda>
Date:   Tue, 22 Aug 2017 17:03:43 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:     alsa-devel@...a-project.org, Jaroslav Kysela <perex@...ex.cz>,
        Julia Lawall <Julia.Lawall@...6.fr>,
        Takashi Iwai <tiwai@...e.com>,
        LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] ALSA: maestro3: Use common error handling code in two
 functions

On Tue, Aug 22, 2017 at 03:43:03PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Tue, 22 Aug 2017 15:00:27 +0200
> 
> Add jump targets so that a bit of exception handling can be better reused
> at the end of these functions.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
>  sound/pci/maestro3.c | 55 +++++++++++++++++++++++++---------------------------
>  1 file changed, 26 insertions(+), 29 deletions(-)
> 
> diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
> index cafea6dc5c01..759c3f6ad7aa 100644
> --- a/sound/pci/maestro3.c
> +++ b/sound/pci/maestro3.c
> @@ -2622,22 +2622,18 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
>  
>  	err = request_firmware(&chip->assp_kernel_image,
>  			       "ess/maestro3_assp_kernel.fw", &pci->dev);
> -	if (err < 0) {
> -		snd_m3_free(chip);
> -		return err;
> -	}
> +	if (err)
> +		goto free_chip;

You never mention in the changelog you've changed these checks from
"if (err < 0)" to "if (err)".  Don't slip in unexpected little changes
like this.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ