From: SF Markus Elfring <elfring@users.sourceforge.net>
To: alsa-devel@alsa-project.org,
Alexey Dobriyan <adobriyan@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Bhumika Goyal <bhumirks@gmail.com>,
Jaroslav Kysela <perex@perex.cz>,
Kees Cook <keescook@chromium.org>, Takashi Iwai <tiwai@suse.com>
Cc: kernel-janitors@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/3] ALSA: korg1212: Delete a duplicate function call "release_firmware" in snd_korg1212_create()
Date: Thu, 16 Nov 2017 12:52:41 +0100 [thread overview]
Message-ID: <7b5b034c-e441-f363-a94f-c81bd0b5ed7a@users.sourceforge.net> (raw)
In-Reply-To: <3f68211d-51f0-2990-d711-44eaeb85ba4d@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 16 Nov 2017 11:22:26 +0100
The function "release_firmware" is called in the current implementation of
the function "_request_firmware" after a failure was detected.
Link: https://elixir.free-electrons.com/linux/v4.14-rc8/source/drivers/base/firmware_class.c#L1196
Such a call should therefore not be repeated directly after the
corresponding error information was received in the local variable "err"
of the function "snd_korg1212_create".
Thus remove a misplaced function call.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
sound/pci/korg1212/korg1212.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c
index 6dde8c215b48..dc701519d219 100644
--- a/sound/pci/korg1212/korg1212.c
+++ b/sound/pci/korg1212/korg1212.c
@@ -2352,7 +2352,6 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci,
err = request_firmware(&dsp_code, "korg/k1212.dsp", &pci->dev);
if (err < 0) {
- release_firmware(dsp_code);
snd_printk(KERN_ERR "firmware not available\n");
snd_korg1212_free(korg1212);
return err;
--
2.15.0
next prev parent reply other threads:[~2017-11-16 11:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-16 11:50 [PATCH 0/3] ALSA: korg1212: Fine-tuning for three function implementations SF Markus Elfring
2017-11-16 11:51 ` [PATCH 1/3] ALSA: korg1212: Adjust eight function calls together with a variable assignment SF Markus Elfring
2017-11-16 11:52 ` SF Markus Elfring [this message]
2017-11-28 7:31 ` [PATCH 2/3] ALSA: korg1212: Delete a duplicate function call "release_firmware" in snd_korg1212_create() Takashi Iwai
2017-11-16 11:53 ` [PATCH 3/3] ALSA: korg1212: Use common error handling code in two functions SF Markus Elfring
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=7b5b034c-e441-f363-a94f-c81bd0b5ed7a@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alsa-devel@alsa-project.org \
--cc=bhumirks@gmail.com \
--cc=keescook@chromium.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--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;
as well as URLs for NNTP newsgroup(s).