From: Dan Carpenter <dan.carpenter@oracle.com>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org,
Takashi Iwai <tiwai@suse.com>,
LKML <linux-kernel@vger.kernel.org>,
Julia Lawall <Julia.Lawall@lip6.fr>
Subject: Re: [PATCH] ALSA: maestro3: Use common error handling code in two functions
Date: Tue, 22 Aug 2017 14:03:43 +0000 [thread overview]
Message-ID: <20170822140343.yg7bh3qylthja3tn@mwanda> (raw)
In-Reply-To: <e6f4f769-eef7-75e7-19b2-7052328f4b9a@users.sourceforge.net>
On Tue, Aug 22, 2017 at 03:43:03PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.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@users.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
next prev parent reply other threads:[~2017-08-22 14:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 13:43 [PATCH] ALSA: maestro3: Use common error handling code in two functions SF Markus Elfring
2017-08-22 14:03 ` Dan Carpenter [this message]
2017-09-06 6:32 ` [PATCH v2] " SF Markus Elfring
2017-09-07 8:24 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170822140343.yg7bh3qylthja3tn@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Julia.Lawall@lip6.fr \
--cc=alsa-devel@alsa-project.org \
--cc=elfring@users.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox