Commit cf576fe5 authored by Markus Elfring's avatar Markus Elfring Committed by Takashi Iwai
Browse files

ALSA: korg1212: Delete a duplicate function call "release_firmware" in snd_korg1212_create()

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 4d0272ca
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -2348,7 +2348,6 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci,


	err = request_firmware(&dsp_code, "korg/k1212.dsp", &pci->dev);
	err = request_firmware(&dsp_code, "korg/k1212.dsp", &pci->dev);
	if (err < 0) {
	if (err < 0) {
		release_firmware(dsp_code);
		snd_printk(KERN_ERR "firmware not available\n");
		snd_printk(KERN_ERR "firmware not available\n");
		snd_korg1212_free(korg1212);
		snd_korg1212_free(korg1212);
		return err;
		return err;